aboutsummaryrefslogtreecommitdiff
path: root/xmake.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake.lua')
-rw-r--r--xmake.lua23
1 files changed, 17 insertions, 6 deletions
diff --git a/xmake.lua b/xmake.lua
index c49a71901..46c403c11 100644
--- a/xmake.lua
+++ b/xmake.lua
@@ -9,6 +9,7 @@ add_requires(
"vcpkg::curl",
"vcpkg::cxxopts",
"vcpkg::doctest",
+ "vcpkg::eastl",
"vcpkg::fmt",
"vcpkg::gsl-lite",
"vcpkg::http-parser",
@@ -24,6 +25,8 @@ add_requires(
"vcpkg::zlib"
)
+add_defines("EASTL_STD_ITERATOR_CATEGORY_ENABLED")
+
set_policy("build.ccache", false)
if is_plat("windows") then
@@ -37,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
@@ -95,12 +108,6 @@ if is_os("windows") then
-- add_ldflags("/MAP")
end
-if is_os("macosx") then
- -- temporary workaround for xcode 12.1 (UE minimum spec is 12.5)
- -- TODO: once CI is updated we should remove this
- add_defines("_LIBCPP_DISABLE_AVAILABILITY")
-end
-
if is_os("linux") or is_os("macosx") then
add_cxxflags("-Wno-implicit-fallthrough")
add_cxxflags("-Wno-missing-field-initializers")
@@ -112,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")