From a1c8f03dc30ad086a2116458ae58ec6e2eddce1b Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 7 Nov 2018 22:32:25 +0800 Subject: improve to detect compiler on macOS if xcode be not installed --- xmake/platforms/macosx/check.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/xmake/platforms/macosx/check.lua b/xmake/platforms/macosx/check.lua index b37519cdb..c85d408e7 100644 --- a/xmake/platforms/macosx/check.lua +++ b/xmake/platforms/macosx/check.lua @@ -52,6 +52,20 @@ function _toolchains(config) checker.toolchain_insert(toolchains, "ex", "xcrun -sdk macosx ", "ar", "the static library extractor") checker.toolchain_insert(toolchains, "sh", "xcrun -sdk macosx ", "clang++", "the shared library linker") checker.toolchain_insert(toolchains, "sh", "xcrun -sdk macosx ", "clang", "the shared library linker") + checker.toolchain_insert(toolchains, "cc", "", "clang", "the c compiler") + checker.toolchain_insert(toolchains, "cc", "", "gcc", "the c compiler") + checker.toolchain_insert(toolchains, "cxx", "", "clang", "the c++ compiler") + checker.toolchain_insert(toolchains, "cxx", "", "gcc", "the c++ compiler") + checker.toolchain_insert(toolchains, "ld", "", "clang++", "the linker") + checker.toolchain_insert(toolchains, "ld", "", "g++", "the linker") + checker.toolchain_insert(toolchains, "ld", "", "clang", "the linker") + checker.toolchain_insert(toolchains, "ld", "", "gcc", "the linker") + checker.toolchain_insert(toolchains, "ar", "", "ar", "the static library archiver") + checker.toolchain_insert(toolchains, "ex", "", "ar", "the static library extractor") + checker.toolchain_insert(toolchains, "sh", "", "clang++", "the shared library linker") + checker.toolchain_insert(toolchains, "sh", "", "g++", "the shared library linker") + checker.toolchain_insert(toolchains, "sh", "", "clang", "the shared library linker") + checker.toolchain_insert(toolchains, "sh", "", "gcc", "the shared library linker") -- insert objc/c++ tools to toolchains checker.toolchain_insert(toolchains, "mm", "", "$(env MM)", "the objc compiler") -- cgit v1.3.1