-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Driver] -fno-plt: warn for unsupported targets
-fno-plt is an ELF specific option that is only implemented for x86 (for a long time) and AArch64 (#78890). GCC doesn't bother to give a diagnostic on Windows. -fno-plt is somewhat popular and we've been ignoring it for unsupported targets for a while, so just report a warning for unsupported targets. Pull Request: llvm/llvm-project#124081
- Loading branch information
Showing
2 changed files
with
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
// RUN: %clang -### -c --target=aarch64 -fno-plt -Werror %s 2>&1 | FileCheck %s --check-prefix=NOPLT | ||
// RUN: %clang -### -c --target=x86_64 -fno-plt -Werror %s 2>&1 | FileCheck %s --check-prefix=NOPLT | ||
|
||
// RUN: %clang -### -c --target=aarch64 -fno-plt -fplt -Werror %s 2>&1 | FileCheck %s --check-prefix=DEFAULT | ||
// RUN: %clang -### -c --target=powerpc64 -fno-plt %s 2>&1 | FileCheck %s --check-prefixes=WARN,DEFAULT | ||
// RUN: %clang -### -c --target=aarch64-windows -fno-plt %s 2>&1 | FileCheck %s --check-prefixes=WARN,DEFAULT | ||
|
||
// WARN: warning: argument unused during compilation: '-fno-plt' [-Wunused-command-line-argument] | ||
// NOPLT: "-fno-plt" | ||
// DEFAULT-NOT: "-fno-plt" |