aboutsummaryrefslogtreecommitdiff
path: root/xmake.lua
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2024-12-04 15:26:06 +0100
committerGitHub Enterprise <[email protected]>2024-12-04 15:26:06 +0100
commit8ee50de758d1343680ebb0ef386247dece2cbd8a (patch)
tree1957c1393d2e3e20041b2b1f1b23e9cd8568c244 /xmake.lua
parentchangelog (diff)
downloadzen-8ee50de758d1343680ebb0ef386247dece2cbd8a.tar.xz
zen-8ee50de758d1343680ebb0ef386247dece2cbd8a.zip
enable LTO / optimize for speed (#256)
* changed so release build uses lto and optimizes for speed on Mac and Windows * Linux does not currently support LTO due to toolchain limitations
Diffstat (limited to 'xmake.lua')
-rw-r--r--xmake.lua6
1 files changed, 5 insertions, 1 deletions
diff --git a/xmake.lua b/xmake.lua
index fc896d3e8..c49a71901 100644
--- a/xmake.lua
+++ b/xmake.lua
@@ -51,7 +51,11 @@ add_rules("mode.debug", "mode.release")
--add_rules("c++.unity_build")
if is_mode("release") then
- set_optimize("smallest")
+ -- LTO does not appear to work with the current UE toolchain
+ if not is_plat("linux") then
+ set_policy("build.optimization.lto", true)
+ end
+ set_optimize("fastest")
end
if is_mode("debug") then