-
Notifications
You must be signed in to change notification settings - Fork 10.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[clang] -mfpmath turned into an error for assembly files in clang-17, previously it was a warning that it was unused. #65023
[clang] -mfpmath turned into an error for assembly files in clang-17, previously it was a warning that it was unused. #65023
Comments
@llvm/issue-subscribers-clang-driver |
CC @jansvoboda11 @MaskRay |
Patch: https://reviews.llvm.org/D159010 I've described the general problem in https://maskray.me/blog/2023-08-25-clang-wunused-command-line-argument#target-specific-options In the long term we should move |
/cherry-pick 081afa3 |
/branch llvm/llvm-project-release-prs/issue65023 |
Some options are only claimed in AddX86TargetArgs/etc (called by Clang::RenderTargetOptions). For assembler input, `Add*TargetArgs` is not called. If an option is unclaimed, it either leads to a -Wunused-command-line-argument warning or an error (if `TargetSpecific` is set) ``` // clang '-###' --target=x86_64 -mfpmath=sse -c a.s clang: error: unsupported option '-mfpmath=sse' for target 'x86_64' ``` For -mfpmath=, it's actually claimed by RenderFloatingPointOptions, which should be moved to AddARMTargetArgs/AddX86TargetArgs later (non-AArch32-non-x86 targets give a frontend error). This change is localized and similar to D153691, for release/17.x backporting. Fix llvm/llvm-project#65023 Reviewed By: thesamesam Differential Revision: https://reviews.llvm.org/D159010 (cherry picked from commit 081afa3d04a4bc0d43c62b5b0e5a84f86a8a70ec)
/pull-request llvm/llvm-project-release-prs#659 |
Some options are only claimed in AddX86TargetArgs/etc (called by Clang::RenderTargetOptions). For assembler input, `Add*TargetArgs` is not called. If an option is unclaimed, it either leads to a -Wunused-command-line-argument warning or an error (if `TargetSpecific` is set) ``` // clang '-###' --target=x86_64 -mfpmath=sse -c a.s clang: error: unsupported option '-mfpmath=sse' for target 'x86_64' ``` For -mfpmath=, it's actually claimed by RenderFloatingPointOptions, which should be moved to AddARMTargetArgs/AddX86TargetArgs later (non-AArch32-non-x86 targets give a frontend error). This change is localized and similar to D153691, for release/17.x backporting. Fix llvm/llvm-project#65023 Reviewed By: thesamesam Differential Revision: https://reviews.llvm.org/D159010 (cherry picked from commit 081afa3d04a4bc0d43c62b5b0e5a84f86a8a70ec)
With clang-17 (rc2,rc3) -mfpmath gives an error with assembly files. Previously it was a warning that the option was unused.
Previous behavior
https://bugs.gentoo.org/912246
The text was updated successfully, but these errors were encountered: