From 1dd43d47d220c5e24e59f9bdf4261a0eeadc69b9 Mon Sep 17 00:00:00 2001 From: Alexander Potapenko Date: Thu, 2 Feb 2023 13:56:32 +0100 Subject: 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. --- sys/targets/targets.go | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'sys') 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 -- cgit mrf-deployment