summaryrefslogtreecommitdiff
path: root/xmake/scripts/tools
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/scripts/tools')
-rw-r--r--xmake/scripts/tools/gcc.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/xmake/scripts/tools/gcc.lua b/xmake/scripts/tools/gcc.lua
index 164dfae12..6f96e2f8b 100644
--- a/xmake/scripts/tools/gcc.lua
+++ b/xmake/scripts/tools/gcc.lua
@@ -77,7 +77,9 @@ function gcc.init(self, name)
end
-- suppress warning for the clang
+ local isclang = false
if name:find("clang") then
+ isclang = true
self.cxflags = self.cxflags or {}
self.mxflags = self.mxflags or {}
self.asflags = self.asflags or {}
@@ -104,6 +106,10 @@ function gcc.init(self, name)
, ["-W2"] = "-Wall"
, ["-W3"] = "-Wall"
+ -- strip
+ , ["-s"] = utils.ifelse(isclang, "-S", "-s")
+ , ["-S"] = "-S"
+
-- others
, ["-ftrapv"] = self._check
, ["-fsanitize=address"] = self._check