summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2020-10-07 00:26:35 +0800
committerruki <[email protected]>2020-10-07 00:26:35 +0800
commitb3693176780c056c66fb2aa1e6e2f251242368c4 (patch)
tree35e05bc2762fac613150d9bbacd8c976764544ac
parentd9c46764bb2e906e7cf8e98ddd70969472ed1c19 (diff)
support icc toolchain for macosx/linux
-rw-r--r--xmake/toolchains/icc/xmake.lua31
1 files changed, 23 insertions, 8 deletions
diff --git a/xmake/toolchains/icc/xmake.lua b/xmake/toolchains/icc/xmake.lua
index 2b501c846..93a851562 100644
--- a/xmake/toolchains/icc/xmake.lua
+++ b/xmake/toolchains/icc/xmake.lua
@@ -37,14 +37,29 @@ toolchain("icc")
on_load(function (toolchain)
-- set toolset
- toolchain:set("toolset", "cc", "icc")
- toolchain:set("toolset", "cxx", "icc", "icpc")
- toolchain:set("toolset", "ld", "g++", "icc") -- TODO g++/clang++ as linker, i++? icpc? ..
- toolchain:set("toolset", "sh", "g++", "icc")
- toolchain:set("toolset", "ar", "ar")
- toolchain:set("toolset", "ex", "ar")
- toolchain:set("toolset", "strip", "strip")
- toolchain:set("toolset", "as", "icc")
+ if toolchain:is_plat("windows") then
+ toolchain:set("toolset", "cc", "icl.exe")
+ toolchain:set("toolset", "cxx", "icl.exe")
+ toolchain:set("toolset", "mrc", "rc.exe")
+ if toolchain:is_arch("x64") then
+ toolchain:set("toolset", "as", "ml64.exe")
+ else
+ toolchain:set("toolset", "as", "ml.exe")
+ end
+ toolchain:set("toolset", "ld", "link.exe")
+ toolchain:set("toolset", "sh", "link.exe")
+ toolchain:set("toolset", "ar", "link.exe")
+ toolchain:set("toolset", "ex", "lib.exe")
+ else
+ toolchain:set("toolset", "cc", "icc")
+ toolchain:set("toolset", "cxx", "icpc", "icc")
+ toolchain:set("toolset", "ld", "icpc", "icc")
+ toolchain:set("toolset", "sh", "icpc", "icc")
+ toolchain:set("toolset", "ar", "ar")
+ toolchain:set("toolset", "ex", "ar")
+ toolchain:set("toolset", "strip", "strip")
+ toolchain:set("toolset", "as", "icc")
+ end
-- add march flags
local march