Revert "[Driver] Mark many target-specific driver-only options as TargetSpecific"
authorHans Wennborg <hans@chromium.org>
Mon, 12 Jun 2023 15:02:37 +0000 (17:02 +0200)
committerHans Wennborg <hans@chromium.org>
Mon, 12 Jun 2023 15:18:09 +0000 (17:18 +0200)
commitb18ca7296ef16700fadac98abe7fac8c8b44b4da
treea4ccec2714c16bca7330fb29ee84213496952cad
parent10e1d5080977c616121c6b9d0acd59a1c3daa9ac
Revert "[Driver] Mark many target-specific driver-only options as TargetSpecific"

This broke building the TSan runtime on Mac, see comment on
https://github.com/llvm/llvm-project/commit/5548843d692a92a7840f14002debc3cebcb3cdc3

> 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]`.
>
> (
> For Intel CPU errata -malign-branch= family options, we also drop the unneeded
> NotXarchOption flag. This flag reports an error if the option is used with
> -Xarch_*. This error reporting does not seem very useful.
> )

This reverts commit 5548843d692a92a7840f14002debc3cebcb3cdc3.
clang/include/clang/Driver/Options.td
clang/test/Driver/munaligned-access-unused.c
clang/test/Driver/x86-malign-branch.c