Skip to content

Commit

Permalink
[Driver] Mark many target-specific driver-only options as TargetSpecific
Browse files Browse the repository at this point in the history
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= (6890b9b), 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.
)
  • Loading branch information
MaskRay committed Jun 9, 2023
1 parent 2c0e6cf commit 5548843
Show file tree
Hide file tree
Showing 3 changed files with 59 additions and 10 deletions.

2 comments on commit 5548843

@zmodem
Copy link
Collaborator

@zmodem zmodem commented on 5548843 Jun 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This broke TSan builds, see https://bugs.chromium.org/p/chromium/issues/detail?id=1454076#c6

I guess since it's changing warnings into errors, it's expected that it would break something :-) It would probably be a good idea to discuss it in a code review.

@zmodem
Copy link
Collaborator

@zmodem zmodem commented on 5548843 Jun 12, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted in b18ca72 until the tsan build can be fixed at least.

Please sign in to comment.