diff options
| author | ruki <[email protected]> | 2015-06-15 10:30:14 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-06-15 10:30:14 +0800 |
| commit | ddf03c22b1b6fcab81e0d3ce5c4a081b704f3a65 (patch) | |
| tree | 98cdbfc56ad0e911c826cfddfde92d4a9a12de38 /xmake/scripts/tools | |
| parent | 31bba0ba7852b0699e41642815455afb62ddc8b7 (diff) | |
enable and disable show menu for option
Diffstat (limited to 'xmake/scripts/tools')
| -rw-r--r-- | xmake/scripts/tools/gcc.lua | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/xmake/scripts/tools/gcc.lua b/xmake/scripts/tools/gcc.lua index be7abad9f..9c735b7ca 100644 --- a/xmake/scripts/tools/gcc.lua +++ b/xmake/scripts/tools/gcc.lua @@ -40,15 +40,19 @@ function gcc._check(self, flag) end -- check it + local result = flag if 0 ~= os.execute(string.format("%s %s -S -o %s -xc %s > %s 2>&1", self._NAME, flag, xmake._NULDEV, xmake._NULDEV, xmake._NULDEV)) then - flag = "" + result = "" end + -- trace + utils.verbose("checking for the compiler flags %s ... %s", flag, utils.ifelse(#result ~= 0, "ok", "no")) + -- save it - self._CHECK[flag] = flag + self._CHECK[flag] = result -- ok? - return flag + return result end -- the init function |
