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