diff options
| -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 |
