diff options
| author | ruki <[email protected]> | 2017-07-06 05:33:03 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-07-06 05:33:03 +0800 |
| commit | a1bdaeab96b1c3a877b17a6511d4adfaab8327f1 (patch) | |
| tree | b86d01607beee4075a71cf24ebee962f33ca8433 /xmake/modules | |
| parent | 54dc847355f7cfec14d2f23db253271baf5bf301 (diff) | |
improve find_tool for gcc on macosx
Diffstat (limited to 'xmake/modules')
| -rw-r--r-- | xmake/modules/detect/tools/find_gcc.lua | 2 | ||||
| -rw-r--r-- | xmake/modules/lib/detect/find_tool.lua | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/xmake/modules/detect/tools/find_gcc.lua b/xmake/modules/detect/tools/find_gcc.lua index d7cbce7d2..dfb826b29 100644 --- a/xmake/modules/detect/tools/find_gcc.lua +++ b/xmake/modules/detect/tools/find_gcc.lua @@ -54,5 +54,5 @@ function main(opt) end -- ok? - return program, version + return program, version, ifelse(os.host() == "macosx", "clang", "gcc") end diff --git a/xmake/modules/lib/detect/find_tool.lua b/xmake/modules/lib/detect/find_tool.lua index 3cc07b071..58289b0dc 100644 --- a/xmake/modules/lib/detect/find_tool.lua +++ b/xmake/modules/lib/detect/find_tool.lua @@ -34,8 +34,8 @@ function _find_from_modules(name, opt) if os.isfile(path.join(os.programdir(), "modules", "detect", "tools", "find_" .. name .. ".lua")) then local find_tool = import("detect.tools.find_" .. name) if find_tool then - local program, version = find_tool(opt) - return {name = name, program = program, version = version} + local program, version, toolname = find_tool(opt) + return {name = toolname or name, program = program, version = version} end end end |
