diff options
author | Rémi Verschelde <remi@verschelde.fr> | 2021-02-01 15:17:00 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-01 15:17:00 +0100 |
commit | 621b4e433e5461827f30c54ff76e4492fc7101d9 (patch) | |
tree | 0613811708305a769481acfb511d677fa71de8bb | |
parent | c691444d2e63c95fdfb9501e5080387cbc8737f2 (diff) | |
parent | 1ebd66dafff915fb76aa0da77af9fa0f6ec741ef (diff) |
Merge pull request #45629 from akien-mga/linux-static-cpp
Linux: Build with use_static_cpp=yes by default
-rw-r--r-- | platform/linuxbsd/detect.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/platform/linuxbsd/detect.py b/platform/linuxbsd/detect.py index a819731328..f94536e073 100644 --- a/platform/linuxbsd/detect.py +++ b/platform/linuxbsd/detect.py @@ -64,7 +64,7 @@ def get_opts(): BoolVariable("use_llvm", "Use the LLVM compiler", False), BoolVariable("use_lld", "Use the LLD linker", False), BoolVariable("use_thinlto", "Use ThinLTO", False), - BoolVariable("use_static_cpp", "Link libgcc and libstdc++ statically for better portability", False), + BoolVariable("use_static_cpp", "Link libgcc and libstdc++ statically for better portability", True), BoolVariable("use_coverage", "Test Godot coverage", False), BoolVariable("use_ubsan", "Use LLVM/GCC compiler undefined behavior sanitizer (UBSAN)", False), BoolVariable("use_asan", "Use LLVM/GCC compiler address sanitizer (ASAN))", False), @@ -390,4 +390,7 @@ def configure(env): # Link those statically for portability if env["use_static_cpp"]: - env.Append(LINKFLAGS=["-static-libgcc", "-static-libstdc++"]) + # Workaround for GH-31743, Ubuntu 18.04 i386 crashes when it's used. + # That doesn't make any sense but it's likely a Ubuntu bug? + if is64 or env["bits"] == "64": + env.Append(LINKFLAGS=["-static-libgcc", "-static-libstdc++"]) |