summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2021-05-05 00:27:19 +0800
committerruki <[email protected]>2021-05-05 00:27:19 +0800
commit85a6481b181f3f4829519291d67138a931e44871 (patch)
tree9246e67eba178da0552eed36055196ff37e436ba
parentea75ce387894387f757cd012b22ca2de453ff583 (diff)
improve tools/xmake
-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 0c1cd2a14..e1e3ac4b0 100644
--- a/xmake/modules/package/tools/xmake.lua
+++ b/xmake/modules/package/tools/xmake.lua
@@ -74,6 +74,9 @@ function _get_configs(package, configs)
end
end
end
+ if not package:is_plat("windows", "mingw") and package:config("pic") ~= false then
+ table.insert(cxflags, "-fPIC")
+ end
if cflags and #cflags > 0 then
table.insert(configs, "--cflags=" .. table.concat(cflags, ' '))
end