summaryrefslogtreecommitdiff
path: root/xmake/platforms/linux/check.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2017-02-23 09:06:08 +0800
committerruki <[email protected]>2017-02-23 09:06:08 +0800
commitbfd35395066fbea02062309dfea660144d162c43 (patch)
treef0403e610b0b70a72ebc6491d8f67252220d517e /xmake/platforms/linux/check.lua
parent4d6a57bfa24a9e0c8a35b18ba69face0d66c1a75 (diff)
improve linux platform
Diffstat (limited to 'xmake/platforms/linux/check.lua')
-rw-r--r--xmake/platforms/linux/check.lua100
1 files changed, 49 insertions, 51 deletions
diff --git a/xmake/platforms/linux/check.lua b/xmake/platforms/linux/check.lua
index e4a3b1a5a..e24235f8f 100644
--- a/xmake/platforms/linux/check.lua
+++ b/xmake/platforms/linux/check.lua
@@ -65,61 +65,59 @@ function _check_toolchains(config)
end
end
- -- no cross toolchains?
- if cross and cross:trim() == "" then
- -- check from env
- checker.check_toolchain_from_env(config, "cc", "CC", "the c compiler")
- checker.check_toolchain_from_env(config, "cxx", "CXX", "the c++ compiler")
- checker.check_toolchain_from_env(config, "mm", "MM", "the objc compiler")
- checker.check_toolchain_from_env(config, "mxx", "MXX", "the objc++ compiler")
- checker.check_toolchain_from_env(config, "as", "AS", "the assember")
- checker.check_toolchain_from_env(config, "ld", "LD", "the linker")
- checker.check_toolchain_from_env(config, "ar", "AR", "the static library archiver")
- checker.check_toolchain_from_env(config, "ex", "AR", "the static library extractor")
- checker.check_toolchain_from_env(config, "sh", "SH", "the shared library linker")
- checker.check_toolchain_from_env(config, "sc", "SC", "the swift compiler")
- end
+ -- check for c/c++ tools
+ checker.check_toolchain(config, "cc", cross, "gcc", "the c compiler")
+ checker.check_toolchain(config, "cc", cross, "clang", "the c compiler")
+ checker.check_toolchain(config, "cxx", cross, "gcc", "the c++ compiler")
+ checker.check_toolchain(config, "cxx", cross, "clang", "the c++ compiler")
+ checker.check_toolchain(config, "cxx", cross, "g++", "the c++ compiler")
+ checker.check_toolchain(config, "cxx", cross, "clang++", "the c++ compiler")
+ checker.check_toolchain(config, "ld", cross, "g++", "the linker")
+ checker.check_toolchain(config, "ld", cross, "gcc", "the linker")
+ checker.check_toolchain(config, "ld", cross, "clang++", "the linker")
+ checker.check_toolchain(config, "ld", cross, "clang", "the linker")
+ checker.check_toolchain(config, "ar", cross, "ar", "the static library archiver")
+ checker.check_toolchain(config, "ex", cross, "ar", "the static library extractor")
+ checker.check_toolchain(config, "sh", cross, "g++", "the shared library linker")
+ checker.check_toolchain(config, "sh", cross, "gcc", "the shared library linker")
+ checker.check_toolchain(config, "sh", cross, "clang++", "the shared library linker")
+ checker.check_toolchain(config, "sh", cross, "clang", "the shared library linker")
+ checker.check_toolchain(config, "dg", cross, "gdb", "the debugger")
+ checker.check_toolchain(config, "dg", cross, "lldb", "the debugger")
- -- check for gcc
- checker.check_toolchain(config, "cc", cross, "gcc", "the c compiler")
- checker.check_toolchain(config, "cxx", cross, "gcc", "the c++ compiler")
- checker.check_toolchain(config, "cxx", cross, "g++", "the c++ compiler")
- checker.check_toolchain(config, "mm", cross, "gcc", "the objc compiler")
- checker.check_toolchain(config, "mxx", cross, "gcc", "the objc++ compiler")
- checker.check_toolchain(config, "mxx", cross, "g++", "the objc++ compiler")
- checker.check_toolchain(config, "as", cross, "gcc", "the assember")
- checker.check_toolchain(config, "ld", cross, "g++", "the linker")
- checker.check_toolchain(config, "ld", cross, "gcc", "the linker")
- checker.check_toolchain(config, "ar", cross, "ar", "the static library archiver")
- checker.check_toolchain(config, "ex", cross, "ar", "the static library extractor")
- checker.check_toolchain(config, "sh", cross, "g++", "the shared library linker")
- checker.check_toolchain(config, "sh", cross, "gcc", "the shared library linker")
- checker.check_toolchain(config, "dg", cross, "gdb", "the debugger")
+ -- check for objc/c++ tools
+ checker.check_toolchain(config, "mm", cross, "clang", "the objc compiler")
+ checker.check_toolchain(config, "mm", cross, "gcc", "the objc compiler")
+ checker.check_toolchain(config, "mxx", cross, "clang++", "the objc++ compiler")
+ checker.check_toolchain(config, "mxx", cross, "clang", "the objc++ compiler")
+ checker.check_toolchain(config, "mxx", cross, "g++", "the objc++ compiler")
+ checker.check_toolchain(config, "mxx", cross, "gcc", "the objc++ compiler")
- -- check for clang
- checker.check_toolchain(config, "cc", cross, "clang", "the c compiler")
- checker.check_toolchain(config, "cxx", cross, "clang", "the c++ compiler")
- checker.check_toolchain(config, "cxx", cross, "clang++", "the c++ compiler")
- checker.check_toolchain(config, "mm", cross, "clang", "the objc compiler")
- checker.check_toolchain(config, "mxx", cross, "clang++", "the objc++ compiler")
- checker.check_toolchain(config, "mxx", cross, "clang", "the objc++ compiler")
- checker.check_toolchain(config, "as", cross, "clang", "the assember")
- checker.check_toolchain(config, "ld", cross, "clang++", "the linker")
- checker.check_toolchain(config, "ld", cross, "clang", "the linker")
- checker.check_toolchain(config, "ar", cross, "ar", "the static library archiver")
- checker.check_toolchain(config, "ex", cross, "ar", "the static library extractor")
- checker.check_toolchain(config, "sh", cross, "clang++", "the shared library linker")
- checker.check_toolchain(config, "sh", cross, "clang", "the shared library linker")
- checker.check_toolchain(config, "sc", cross, "swiftc", "the swift compiler")
- checker.check_toolchain(config, "dg", cross, "lldb", "the debugger")
+ -- check for asm tools
+ checker.check_toolchain(config, "as", cross, "clang", "the assember")
+ checker.check_toolchain(config, "as", cross, "gcc", "the assember")
-- check for golang tools
- checker.check_toolchain(config, "go", "", "go", "the golang compiler")
- checker.check_toolchain(config, "go", "", "gccgo", "the golang compiler")
- checker.check_toolchain(config, "go-ar","", "go", "the golang static library archiver")
- checker.check_toolchain(config, "go-ar","", "gccgo", "the golang static library archiver")
- checker.check_toolchain(config, "go-ld","", "go", "the golang linker")
- checker.check_toolchain(config, "go-ld","", "gccgo", "the golang linker")
+ checker.check_toolchain(config, "go", "", "go", "the golang compiler")
+ checker.check_toolchain(config, "go", "", "gccgo", "the golang compiler")
+ checker.check_toolchain(config, "go-ar", "", "go", "the golang static library archiver")
+ checker.check_toolchain(config, "go-ar", "", "gccgo", "the golang static library archiver")
+ checker.check_toolchain(config, "go-ld", "", "go", "the golang linker")
+ checker.check_toolchain(config, "go-ld", "", "gccgo", "the golang linker")
+
+ -- check for dlang tools
+ checker.check_toolchain(config, "dc", "", "dmd", "the dlang compiler")
+ checker.check_toolchain(config, "dc", "", "ldc2", "the dlang compiler")
+ checker.check_toolchain(config, "dc", "", "gdc", "the dlang compiler")
+ checker.check_toolchain(config, "dc-ar", "", "dmd", "the dlang static library archiver")
+ checker.check_toolchain(config, "dc-ar", "", "ldc2", "the dlang static library archiver")
+ checker.check_toolchain(config, "dc-ar", "", "gdc", "the dlang static library archiver")
+ checker.check_toolchain(config, "dc-sh", "", "dmd", "the dlang shared library linker")
+ checker.check_toolchain(config, "dc-sh", "", "ldc2", "the dlang shared library linker")
+ checker.check_toolchain(config, "dc-sh", "", "gdc", "the dlang shared library linker")
+ checker.check_toolchain(config, "dc-ld", "", "dmd", "the dlang linker")
+ checker.check_toolchain(config, "dc-ld", "", "ldc2", "the dlang linker")
+ checker.check_toolchain(config, "dc-ld", "", "gdc", "the dlang linker")
end
-- check it