aboutsummaryrefslogtreecommitdiff
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
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
-rw-r--r--CHANGELOG.md2
-rw-r--r--xmake.lua6
2 files changed, 7 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 172ab96ab..80bec842a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,6 @@
##
+- Improvement: Build release binaries with LTO on Windows/Mac
+- Improvement: Release binaries now build with "faster" instead of "smaller" optimization flags
## 5.5.15
- Bugfix: Fix returned content type when requesting a project store chunk with non-compressed accept type
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