diff options
| author | ruki <[email protected]> | 2020-05-26 22:40:59 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-05-26 10:05:55 +0800 |
| commit | 953abc087b44da8f7bb8d55bef2ef828932633e9 (patch) | |
| tree | 3e547bff9ee0e325645b14c0380694fd2fce1d07 | |
| parent | 7815a23fa7483352aad20834edb486fe60051811 (diff) | |
fix strip debug for linux
| -rw-r--r-- | xmake/modules/core/tools/gcc.lua | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/xmake/modules/core/tools/gcc.lua b/xmake/modules/core/tools/gcc.lua index f74287f9a..912519316 100644 --- a/xmake/modules/core/tools/gcc.lua +++ b/xmake/modules/core/tools/gcc.lua @@ -56,7 +56,7 @@ function init(self) -- strip , ["-s"] = "-s" - , ["-S"] = "-S" + , ["-S"] = "-Wl,-S" }) -- for macho target @@ -64,7 +64,6 @@ function init(self) self:add("mapflags", { ["-s"] = "-Wl,-x" - , ["-S"] = "-Wl,-S" }) end end @@ -73,14 +72,11 @@ end function nf_strip(self, level) local maps = { - debug = "-S" + debug = "-Wl,-S" , all = "-s" } - - local plat = config.plat() - if plat == "macosx" or plat == "iphoneos" then + if is_plat("macosx") or is_plat("iphoneos") then maps.all = "-Wl,-x" - maps.debug = "-Wl,-S" end return maps[level] end |
