[all-commits] [llvm/llvm-project] 34d7ac: [Driver] Mark many target-specific driver-only opt...
Fangrui Song via All-commits
all-commits at lists.llvm.org
Mon Jun 12 12:34:21 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 34d7acd444b88342fc93fca202608c1e16fa5946
https://github.com/llvm/llvm-project/commit/34d7acd444b88342fc93fca202608c1e16fa5946
Author: Fangrui Song <i at maskray.me>
Date: 2023-06-12 (Mon, 12 Jun 2023)
Changed paths:
M clang/include/clang/Driver/Options.td
M clang/test/Driver/munaligned-access-unused.c
M clang/test/Driver/x86-malign-branch.c
Log Message:
-----------
[Driver] Mark many target-specific driver-only options as TargetSpecific
so that they get an error on other targets. This change uses let statements to
apply `Flags = [TargetSpecific]` to options (mostly -m*) without specifying `Flags`.
Follow-up to D151590.
For some options, e.g. -mdefault-build-attributes (D31813), -mbranch-likely
(D38168), -mfpu=/-mabi= (6890b9b71e525020ab58d436336664beede71575), a warning
seems desired in at least certain cases. This is not the best practice, but this
change works around them by not applying `Flags = [TargetSpecific]`.
Some m_x86_Features_Group options are popular. We make them TargetSpecific in a
future patch.
(
For Intel CPU errata -malign-branch= family options, we also drop the unneeded
NotXarchOption flag (was confuslingly named DriverOption). This flag reports an
error if the option is used with -Xarch_*. This error reporting does not seem
correct/useful.
)
More information about the All-commits
mailing list