[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
parent
fcf1a102
Please register or sign in to comment