summaryrefslogtreecommitdiffstatshomepage
path: root/scripts
diff options
context:
space:
mode:
author Vas Crabb <vas@vastheman.com>2022-04-03 14:34:38 +1000
committer Vas Crabb <vas@vastheman.com>2022-04-03 14:34:38 +1000
commitea30ec72f44ca373ceafbe9eab4c2897da0329c9 (patch)
tree86e60d6ba3d6cb6877fa567aba20298b000319c7 /scripts
parent6edc4f9681d53a71c2638a140d2305a4599323e4 (diff)
Disable lifetime dead store elimination for Linux GCC builds.
This will hopefully work around the very unhelpful uninitialised variable warning that seems to be triggered by using Sol's get function with std::optional<T> or sol::optional<T> on Linux.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/genie.lua7
1 files changed, 6 insertions, 1 deletions
diff --git a/scripts/genie.lua b/scripts/genie.lua
index 012d65d8302..0c0f8fb5f27 100644
--- a/scripts/genie.lua
+++ b/scripts/genie.lua
@@ -93,6 +93,11 @@ function addprojectflags()
buildoptions_cpp {
"-Wsuggest-override",
}
+ configuration { "linux-*" }
+ buildoptions_cpp {
+ "-flifetime-dse=1", -- GCC for Linux takes issue with Sol's get<std::optional<T> >() otherwise
+ }
+ configuration {}
end
end
@@ -1217,7 +1222,7 @@ configuration { "android-arm64" }
"-Wno-asm-operand-widths",
}
-configuration { "linux-*"}
+configuration { "linux-*" }
links {
"dl",
"rt",