summaryrefslogtreecommitdiff
path: root/xmake/scripts/tools/gcc.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2015-07-14 18:24:36 +0800
committerruki <[email protected]>2015-07-14 18:24:36 +0800
commit928101a35f7ef42aa96ad76564b1e120066cbb14 (patch)
treef26503d6c2251dd65118e0503eabef4644e0a1e7 /xmake/scripts/tools/gcc.lua
parent48b22f27376341ba8ad8e585bb5b257b50bde048 (diff)
fix mapping flags for compiler and linker
Diffstat (limited to 'xmake/scripts/tools/gcc.lua')
-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