aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorFangrui Song <i@maskray.me>2023-08-03 19:04:53 -0700
committerFangrui Song <i@maskray.me>2023-08-03 19:04:53 -0700
commit5fd5f8027fa196913138a34082a933abd5be0b4e (patch)
tree0eddcaf33d04b9dd44a27f66578f445bb5a70992 /clang/lib/Frontend/CompilerInvocation.cpp
parentfcf1a1022a08e28716da98d5983205337435a85c (diff)
downloadllvm-5fd5f8027fa196913138a34082a933abd5be0b4e.zip
llvm-5fd5f8027fa196913138a34082a933abd5be0b4e.tar.gz
llvm-5fd5f8027fa196913138a34082a933abd5be0b4e.tar.bz2
[Driver] Mark m_x86_Features_Group options as TargetSpecific
so that they lead to an error when compiled for non-x86 targets. Follow-up to D151590. ``` % aarch64-linux-gnu-gcc -c -mavx a.c aarch64-linux-gnu-gcc: error: unrecognized command-line option ‘-mavx’ % clang --target=aarch64-unknown-linux-gnu -c -mavx a.c # without this patch clang: warning: argument unused during compilation: '-mavx' [-Wunused-command-line-argument] ... % clang --target=aarch64-unknown-linux-gnu -c -mavx a.c # with this patch clang: error: unsupported option '-mavx' for target 'aarch64-unknown-linux-gnu' ``` As a workaround for https://github.com/llvm/llvm-project/issues/63270, we don't report an error for -msse4.2. Reviewed By: pengfei, skan Differential Revision: https://reviews.llvm.org/D156962
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions