diff options
| author | ruki <[email protected]> | 2016-04-13 19:25:40 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-04-13 19:25:40 +0800 |
| commit | 28838d094db827cdf7dd951524c6598f90220bae (patch) | |
| tree | bea30dc0ec7bd748012024901955cc979e28a5f7 | |
| parent | 3126beb37ff78520bdb23bb9c0548b9c6a80cf22 (diff) | |
check flags
| -rw-r--r-- | xmake/core/tool/compiler.lua | 6 | ||||
| -rw-r--r-- | xmake/core/tool/tool.lua | 3 |
2 files changed, 7 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 diff --git a/xmake/core/tool/tool.lua b/xmake/core/tool/tool.lua index fcfc28b1e..b38bd6ee2 100644 --- a/xmake/core/tool/tool.lua +++ b/xmake/core/tool/tool.lua @@ -135,6 +135,9 @@ function _module:check(flags) os.raise(results) end + -- trace + utils.printf("checking for the flags %s ... %s", flags, utils.ifelse(results, "ok", "no")) + -- save the checked result interface.checked[flags] = results |
