This short option taking an argument is unfortunate. * If a cc1-only option starts with `-e`, using it for driver will not be reported as an error (e.g. commit 6cd9886c88d16d288c74846495d89f2fe84ff827). * If another `-e` driver option is intended but a typo is made, the option will be recognized as a `-e`. `gcc -export-dynamic` passes `-export-dynamic` to ld. It's not clear whether some options behave this way. It seems `-Wl,-eentry` and `-Wl,--entry=entry` are primarily used. There may also be a few `gcc -e entry`, but `gcc -eentry` is extremely rare or not used at all. Therefore, we probably should reject the Joined form of `-e`.
6 lines
269 B
ArmAsm
6 lines
269 B
ArmAsm
/// To prevent mistaking -exxx as --entry=xxx, we allow -e xxx but reject -exxx.
|
|
/// GCC -export-dynamic is rejected as well.
|
|
// RUN: not %clang -### --target=x86_64-linux-gnu -export-dynamic %s 2>&1 | FileCheck %s
|
|
|
|
// CHECK: error: unknown argument: '-export-dynamic'
|