summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/package/tools/xmake.lua10
1 files changed, 9 insertions, 1 deletions
diff --git a/xmake/modules/package/tools/xmake.lua b/xmake/modules/package/tools/xmake.lua
index 4d2294d40..8d9b2f0c4 100644
--- a/xmake/modules/package/tools/xmake.lua
+++ b/xmake/modules/package/tools/xmake.lua
@@ -98,8 +98,16 @@ function _get_configs(package, configs)
end
end
end
+ local policies = get_config("policies")
if package:config("lto") then
- table.insert(configs, "--policies=build.optimization.lto")
+ if policies then
+ policies = policies .. ",build.optimization.lto"
+ else
+ policies = "build.optimization.lto"
+ end
+ end
+ if policies then
+ table.insert(configs, "--policies=" .. policies)
end
if not package:is_plat("windows", "mingw") and package:config("pic") ~= false then
table.insert(cxflags, "-fPIC")