forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Driver,X86] Ignore -mfpmath= for assembler input
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#65023 Reviewed By: thesamesam Differential Revision: https://reviews.llvm.org/D159010 (cherry picked from commit 081afa3)
- Loading branch information
Showing
4 changed files
with
14 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
// RUN: %clang -### -c --target=x86_64 -mfpmath=sse %s 2>&1 | FileCheck %s | ||
// CHECK: "-mfpmath" "sse" | ||
|
||
/// Don't warn for assembler input. | ||
// RUN: %clang -### -Werror -c --target=x86_64 -mfpmath=sse -x assembler %s 2>&1 | FileCheck /dev/null --implicit-check-not='"-mfpmath"' |