summaryrefslogtreecommitdiff
path: root/xmake/tools/gcc.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/tools/gcc.lua')
-rw-r--r--xmake/tools/gcc.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/xmake/tools/gcc.lua b/xmake/tools/gcc.lua
index 17cc31072..16a85867f 100644
--- a/xmake/tools/gcc.lua
+++ b/xmake/tools/gcc.lua
@@ -49,17 +49,17 @@ function init(shellname, kind)
-- init shflags
_g.shflags = { "-shared", "-fPIC" }
- -- link stdc++ for gcc
- _g.ldflags = {}
- if _g.shellname:find("gcc", 1, true) then
- table.insert(_g.ldflags, "-lstdc++")
- table.insert(_g.shflags, "-lstdc++")
- end
-
-- init cxflags for the kind: shared
_g.shared = {}
_g.shared.cxflags = {"-fPIC"}
+ -- suppress warning for clang (gcc -> clang on macosx)
+ if try { function () check("-Qunused-arguments"); return true end } then
+ _g.cxflags = {"-Qunused-arguments"}
+ _g.mxflags = {"-Qunused-arguments"}
+ _g.asflags = {"-Qunused-arguments"}
+ end
+
-- init flags map
_g.mapflags =
{