aboutsummaryrefslogtreecommitdiff
path: root/scripts/bundle.lua
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2026-03-04 14:00:34 +0100
committerGitHub Enterprise <[email protected]>2026-03-04 14:00:34 +0100
commit794f093057c58c4909a0653edb54fdf869560596 (patch)
treea730072e40f7eb60c7761ffb44c939aa1ad981bb /scripts/bundle.lua
parentIterateChunks callback is multithreaded - make sure AttachmentsSize can handl... (diff)
downloadzen-794f093057c58c4909a0653edb54fdf869560596.tar.xz
zen-794f093057c58c4909a0653edb54fdf869560596.zip
native xmake toolchain definition for UE-clang (#805)
This change is meant to provide a smoother experience when working on Linux. After this change, the toolchain setup process is now simply ```bash $ scripts/ue_build_linux/get_ue_toolchain.sh ``` and then at config time the toolchain is automatically detected if you downloaded it to the default location or have the `UE_TOOLCHAIN_DIR` environment variable set ```bash xmake config --mode=debug ``` Compared to the old script-based approach this configures the toolchain more precisely, avoiding leakage into unrelated build processes such as when a package manager decides to build something like Ninja locally etc.
Diffstat (limited to 'scripts/bundle.lua')
-rw-r--r--scripts/bundle.lua10
1 files changed, 10 insertions, 0 deletions
diff --git a/scripts/bundle.lua b/scripts/bundle.lua
index 07e120d04..b2a5e1e08 100644
--- a/scripts/bundle.lua
+++ b/scripts/bundle.lua
@@ -17,7 +17,15 @@ end
--------------------------------------------------------------------------------
local function _build(arch, debug, config_args)
+ import("core.project.config")
+ config.load()
+
variant = debug and "debug" or "release"
+
+ -- Preserve toolchain/sdk from current config so --clean doesn't lose them
+ local toolchain_arg = config.get("toolchain") and ("--toolchain=" .. config.get("toolchain")) or nil
+ local sdk_arg = config.get("sdk") and ("--sdk=" .. config.get("sdk")) or nil
+
local ret = _exec(
"xmake",
"config",
@@ -26,6 +34,8 @@ local function _build(arch, debug, config_args)
"--mode="..variant,
"--arch="..arch,
"--zensentry=yes",
+ toolchain_arg,
+ sdk_arg,
config_args)
if ret > 0 then
raise("Failed to configure xmake")