llvm/llvm-project

[clang] --entry command line option is broken

オープン

#68,355 opened on 2023/10/05

 (16 件のコメント) (1 件のリアクション) (1 人の担当者)C++ (10,782 件のフォーク)batch import
clang:drivergood first issue

Repository metrics

Stars
 (26,378 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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

コントリビューターガイド