[PATCH] D93375: [clang][driver] Add -ansi option to CompileOnly group

Timm Bäder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jan 8 01:04:19 PST 2021


tbaeder added a comment.

That sounds good but it's different to what this patch is trying to accomplish, isn't it? -ansi already doesn't get passed to the linker.
E.g. with clang 10.0.1 without this patch:

  ~ ❯ clang test.o -o test -ansi -###
  clang version 10.0.1 (Fedora 10.0.1-3.fc32)
  Target: x86_64-unknown-linux-gnu
  Thread model: posix
  InstalledDir: /usr/bin
  clang-10: warning: argument unused during compilation: '-ansi' [-Wunused-command-line-argument]
   "/usr/bin/ld" "--hash-style=gnu" "--build-id" "--eh-frame-hdr" "-m" "elf_x86_64" "-dynamic-linker" "/lib64/ld-linux-x86-64.so.2" "-o" "test" "/usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../../../lib64/crt1.o" "/usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../../../lib64/crti.o" "/usr/bin/../lib/gcc/x86_64-redhat-linux/10/crtbegin.o" "-L/usr/bin/../lib/gcc/x86_64-redhat-linux/10" "-L/usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../../../lib64" "-L/usr/bin/../lib64" "-L/lib/../lib64" "-L/usr/lib/../lib64" "-L/usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../.." "-L/usr/bin/../lib" "-L/lib" "-L/usr/lib" "test.o" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "-lc" "-lgcc" "--as-needed" "-lgcc_s" "--no-as-needed" "/usr/bin/../lib/gcc/x86_64-redhat-linux/10/crtend.o" "/usr/bin/../lib/gcc/x86_64-redhat-linux/10/../../../../lib64/crtn.o"




CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D93375/new/

https://reviews.llvm.org/D93375



More information about the cfe-commits mailing list