llvm/llvm-project

[clang] --entry command line option is broken

Open

#68,355 建立於 2023年10月5日

在 GitHub 查看
 (16 留言) (1 反應) (1 負責人)C++ (10,782 fork)batch import
clang:drivergood first issue

倉庫指標

Star
 (26,378 star)
PR 合併指標
 (平均合併 1天 2小時) (30 天內合併 1,000 個 PR)

描述

Optoion '--entry' ('--entry=') should be forwarded to linker the same way as its aliasee '-e' is forwarded. Currently, it complains about unsupported option.

clang test.c --entry=my_start
clang: error: unsupported option '--entry=my_start'

Apparently, the option is declared as a flag, i.e. clang accepts this, but linker non-surprisingly fails:

clang test.c --entry
/usr/bin/ld: warning: cannot find entry symbol --library=gcc; defaulting to 0000000000001040

Reference: https://gcc.gnu.org/onlinedocs/gcc/Link-Options.html#index-e

貢獻者指南