aboutsummaryrefslogtreecommitdiff
path: root/xmake.lua
diff options
context:
space:
mode:
authorLiam Mitchell <[email protected]>2025-06-17 09:57:11 -0700
committerGitHub Enterprise <[email protected]>2025-06-17 09:57:11 -0700
commit91dd0dc7048a4b08bfd010ea6a90feba251f4af1 (patch)
treef3bf0b2cbfa6ed40a1be334178a2c624c59ae614 /xmake.lua
parentchangelog typo (diff)
parentTemporarily disable stripping of symbols while investigating issues with tool... (diff)
downloadzen-91dd0dc7048a4b08bfd010ea6a90feba251f4af1.tar.xz
zen-91dd0dc7048a4b08bfd010ea6a90feba251f4af1.zip
Merge pull request #436 from ue-foundation/lm/toolchain-update
Update to recent UE toolchain, and link statically against toolchain libc++ and libc++abi
Diffstat (limited to 'xmake.lua')
-rw-r--r--xmake.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/xmake.lua b/xmake.lua
index 9b433689d..ea7183900 100644
--- a/xmake.lua
+++ b/xmake.lua
@@ -40,6 +40,16 @@ if is_plat("windows") then
add_requires("7z")
end
+-- If we're using the UE cross-compile toolchain, we need to ensure we link statically
+-- against the toolchain libc++ and libc++abi, as the system ones can differ in ABI
+-- leading to nasty crashes
+if is_plat("linux") and "$(env UE_TOOLCHAIN_DIR)" ~= "" then
+ add_ldflags("-static-libstdc++")
+ add_ldflags("$(projectdir)/thirdparty/ue-libcxx/lib64/libc++.a")
+ add_ldflags("$(projectdir)/thirdparty/ue-libcxx/lib64/libc++abi.a")
+ set_toolset("objcopy", "$(env UE_TOOLCHAIN_DIR)/bin/llvm-objcopy")
+end
+
add_requires("vcpkg::mimalloc")
if has_config("zensentry") then
@@ -109,6 +119,10 @@ if is_os("linux") or is_os("macosx") then
add_cxxflags("-Wno-unused-variable")
end
+if is_os("linux") then
+ add_cxxflags("-Wno-vla-cxx-extension")
+end
+
-- Turn use of undefined cpp macros into errors
if is_os("windows") then
add_cxxflags("/we4668")
@@ -177,6 +191,7 @@ set_languages("cxx20")
-- always generate debug information
set_symbols("debug")
+set_strip("none")
includes("src/transports")
includes("src/zenbase")