summaryrefslogtreecommitdiffstatshomepage
path: root/scripts
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2021-03-29 04:30:37 +1100
committer Vas Crabb <vas@vastheman.com>2021-03-29 04:30:37 +1100
commit438edcd151dae46de91c54a6e0c5ead8ed8f3800 (patch)
treeb9ff6e83f17df1d83139e7597a99b7ccacbd421a /scripts
parent678cd3c9219c131366f4dcca29cb338257df9b43 (diff)
Fix building with clang 6
Annoyingly, clang 6 produces warnings for unused private static data members, but does not recognise the [[maybe_unused]] attribute for them.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/genie.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/scripts/genie.lua b/scripts/genie.lua
index 895e8e3df3e..7ecd386cafa 100644
--- a/scripts/genie.lua
+++ b/scripts/genie.lua
@@ -1086,6 +1086,12 @@ end
"-Wno-unknown-warning-option",
"-Wno-unused-value",
}
+ if (version < 70000) or ((version < 100001) and (_OPTIONS["targetos"] == 'macosx')) then
+ buildoptions { -- clang 6.0 complains that [[maybe_unused]] is ignored for static data members
+ "-Wno-error=ignored-attributes",
+ "-Wno-error=unused-const-variable",
+ }
+ end
if ((version >= 100000) and (_OPTIONS["targetos"] ~= 'macosx')) or (version >= 120000) then
buildoptions {
"-Wno-xor-used-as-pow", -- clang 10.0 complains that expressions like 10 ^ 7 look like exponention