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

贡献者指南