From 953abc087b44da8f7bb8d55bef2ef828932633e9 Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 26 May 2020 22:40:59 +0800 Subject: fix strip debug for linux --- xmake/modules/core/tools/gcc.lua | 10 +++------- 1 file 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 -- cgit v1.3.1