aboutsummaryrefslogtreecommitdiffstats
path: root/sys/targets
diff options
context:
space:
mode:
authorAlexander Potapenko <glider@google.com>2023-02-02 13:56:32 +0100
committerAlexander Potapenko <ramosian.glider@gmail.com>2023-02-02 14:54:38 +0100
commit1dd43d47d220c5e24e59f9bdf4261a0eeadc69b9 (patch)
treea27b46993f329169e504847edb2f326807120a97 /sys/targets
parent33a66d61892046a4b691ce3759eb1cb52a89387f (diff)
sys/targets: pass -Wno-unused-command-line-argument to the compiler
Clang enables -Wunused-command-line-argument by default, which may start complaining if any of the options are unused.
Diffstat (limited to 'sys/targets')
-rw-r--r--sys/targets/targets.go18
1 files changed, 10 insertions, 8 deletions
diff --git a/sys/targets/targets.go b/sys/targets/targets.go
index 422a129ca..71988ea32 100644
--- a/sys/targets/targets.go
+++ b/sys/targets/targets.go
@@ -577,16 +577,18 @@ var (
"-Wno-array-bounds",
"-Wno-format-overflow",
"-Wno-unused-but-set-variable",
+ "-Wno-unused-command-line-argument",
}
optionalCFlags = map[string]bool{
- "-static": true, // some distributions don't have static libraries
- "-static-pie": true, // this flag is also not supported everywhere
- "-Wunused-const-variable": true, // gcc 5 does not support this flag
- "-fsanitize=address": true, // some OSes don't have ASAN
- "-Wno-stringop-overflow": true,
- "-Wno-array-bounds": true,
- "-Wno-format-overflow": true,
- "-Wno-unused-but-set-variable": true,
+ "-static": true, // some distributions don't have static libraries
+ "-static-pie": true, // this flag is also not supported everywhere
+ "-Wunused-const-variable": true, // gcc 5 does not support this flag
+ "-fsanitize=address": true, // some OSes don't have ASAN
+ "-Wno-stringop-overflow": true,
+ "-Wno-array-bounds": true,
+ "-Wno-format-overflow": true,
+ "-Wno-unused-but-set-variable": true,
+ "-Wno-unused-command-line-argument": true,
}
fallbackCFlags = map[string]string{
"-static-pie": "-static", // if an ASLR static binary is impossible, build just a static one