summaryrefslogtreecommitdiff
path: root/xmake/core/tool/compiler.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2016-04-13 19:25:40 +0800
committerruki <[email protected]>2016-04-13 19:25:40 +0800
commit28838d094db827cdf7dd951524c6598f90220bae (patch)
treebea30dc0ec7bd748012024901955cc979e28a5f7 /xmake/core/tool/compiler.lua
parent3126beb37ff78520bdb23bb9c0548b9c6a80cf22 (diff)
check flags
Diffstat (limited to 'xmake/core/tool/compiler.lua')
-rw-r--r--xmake/core/tool/compiler.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/xmake/core/tool/compiler.lua b/xmake/core/tool/compiler.lua
index 9ffe21253..294a9c6c0 100644
--- a/xmake/core/tool/compiler.lua
+++ b/xmake/core/tool/compiler.lua
@@ -128,8 +128,10 @@ function compiler:_mapflag(flag, mapflags)
end
end
- -- return it directly
- return flag
+ -- check it
+ if self:_tool():check(flag) then
+ return flag
+ end
end
-- map gcc flags to the given compiler flags