From 438edcd151dae46de91c54a6e0c5ead8ed8f3800 Mon Sep 17 00:00:00 2001 From: Vas Crabb Date: Mon, 29 Mar 2021 04:30:37 +1100 Subject: [PATCH] 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. --- scripts/genie.lua | 6 ++++++ 1 file changed, 6 insertions(+) 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