summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2022-07-02 17:19:20 +0800
committerruki <[email protected]>2022-07-02 17:19:20 +0800
commit07343396c6a800583b4bc0015475df8412825b18 (patch)
tree13b178deca849b8d0e3b519b689d6a1a26405c32
parent841f24cf6a0b94a167f4b4c5f2ca8f6564383c0c (diff)
improve xmake tool
-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