summaryrefslogtreecommitdiff
path: root/xmake/modules/package/tools/xmake.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/modules/package/tools/xmake.lua')
-rw-r--r--xmake/modules/package/tools/xmake.lua3
1 files changed, 3 insertions, 0 deletions
diff --git a/xmake/modules/package/tools/xmake.lua b/xmake/modules/package/tools/xmake.lua
index 6e98adc7b..b871afcd2 100644
--- a/xmake/modules/package/tools/xmake.lua
+++ b/xmake/modules/package/tools/xmake.lua
@@ -94,6 +94,9 @@ function _get_configs(package, configs)
end
end
end
+ if package:config("lto") then
+ table.insert(configs, "--policies=build.optimization.lto")
+ end
if not package:is_plat("windows", "mingw") and package:config("pic") ~= false then
table.insert(cxflags, "-fPIC")
end