summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools/gcc.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2018-02-23 00:23:38 +0800
committerruki <[email protected]>2018-02-22 20:21:48 +0800
commit0c051195985a1f43311d1d29c756a6b02531799d (patch)
tree90fb8da1f5dbc79485cfd5f96d34499429eb7f27 /xmake/modules/core/tools/gcc.lua
parent658c0ccdc65b63658a21735b21f806923f2fa70b (diff)
fix strip all bug for clang/macho
Diffstat (limited to 'xmake/modules/core/tools/gcc.lua')
-rw-r--r--xmake/modules/core/tools/gcc.lua14
1 files changed, 14 insertions, 0 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua
index d25a0b9ea..963517af0 100644
--- a/xmake/modules/core/tools/gcc.lua
+++ b/xmake/modules/core/tools/gcc.lua
@@ -67,6 +67,13 @@ function init(self)
, ["-S"] = "-S"
}
+ -- for macho target
+ local plat = config.plat()
+ if plat == "macosx" or plat == "iphoneos" then
+ _g.mapflags["-s"] = "-Wl,-x"
+ _g.mapflags["-S"] = "-Wl,-S"
+ end
+
-- init buildmodes
_g.buildmodes =
{
@@ -91,6 +98,13 @@ function nf_strip(self, level)
, all = "-s"
}
+ -- for macho target
+ local plat = config.plat()
+ if plat == "macosx" or plat == "iphoneos" then
+ maps.all = "-Wl,-x"
+ maps.debug = "-Wl,-S"
+ end
+
-- make it
return maps[level]
end