Open paparodeo opened 4 hours ago
@llvm/issue-subscribers-clang-driver
Author: Reno Dakota (paparodeo)
this can be reproduce on x64 linux by finding some other unsupported option: eg
$ clang -mno-mma -mhtm hello.c
clang: error: unsupported option '-mno-mma' for target 'x86_64-unknown-linux-gnu'
clang: error: unsupported option '-mhtm' for target 'x86_64-unknown-linux-gnu'
$ clang -mno-mma -mhtm hello.c -lc
$ ./a.out
hello world
on aarch64 darwin using the
-mpopcnt
flag will result in a warning on clang 16 and error on clang 19.1.3. however, if a linker flag trails the file name no warning / error is generated. eg:however, re-ordering the command line so the file name comes after
-lc
will generate the expected errorthis behavior is not seen with all link flags, eg
-flat_namespace
always will generate an error, but when used in conjunction with-Wl
will generate an error (as do other flags, like-v
)