summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2026-03-30 23:23:08 +0800
committerruki <[email protected]>2026-03-30 23:23:08 +0800
commit026ef6d6eb6bdd5206ab179b15a8dd18c59e3904 (patch)
tree873027769b79bd3d50131323a1e52872231255ae
parent21760e232a003e32f6ac10099a603a6366eb6aca (diff)
switch icx to icx-cc on windows
-rw-r--r--xmake/modules/core/tools/icx_cc.lua22
-rw-r--r--xmake/modules/core/tools/icx_cc/has_flags.lua22
-rw-r--r--xmake/modules/detect/tools/find_icx_cc.lua39
-rw-r--r--xmake/toolchains/icx/load.lua12
4 files changed, 89 insertions, 6 deletions
diff --git a/xmake/modules/core/tools/icx_cc.lua b/xmake/modules/core/tools/icx_cc.lua
new file mode 100644
index 000000000..bf44dea16
--- /dev/null
+++ b/xmake/modules/core/tools/icx_cc.lua
@@ -0,0 +1,22 @@
+--!A cross-platform build utility based on Lua
+--
+-- Licensed under the Apache License, Version 2.0 (the "License");
+-- you may not use this file except in compliance with the License.
+-- You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+-- Copyright (C) 2015-present, Xmake Open Source Community.
+--
+-- @author ruki
+-- @file icx_cc.lua
+--
+
+-- inherit icx (clang-compatible)
+inherit("icx")
diff --git a/xmake/modules/core/tools/icx_cc/has_flags.lua b/xmake/modules/core/tools/icx_cc/has_flags.lua
new file mode 100644
index 000000000..4f1ca98b2
--- /dev/null
+++ b/xmake/modules/core/tools/icx_cc/has_flags.lua
@@ -0,0 +1,22 @@
+--!A cross-platform build utility based on Lua
+--
+-- Licensed under the Apache License, Version 2.0 (the "License");
+-- you may not use this file except in compliance with the License.
+-- You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+-- Copyright (C) 2015-present, Xmake Open Source Community.
+--
+-- @author ruki
+-- @file has_flags.lua
+--
+
+-- inherit icx has_flags
+inherit("core.tools.icx.has_flags")
diff --git a/xmake/modules/detect/tools/find_icx_cc.lua b/xmake/modules/detect/tools/find_icx_cc.lua
new file mode 100644
index 000000000..ce3e49fbf
--- /dev/null
+++ b/xmake/modules/detect/tools/find_icx_cc.lua
@@ -0,0 +1,39 @@
+--!A cross-platform build utility based on Lua
+--
+-- Licensed under the Apache License, Version 2.0 (the "License");
+-- you may not use this file except in compliance with the License.
+-- You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing, software
+-- distributed under the License is distributed on an "AS IS" BASIS,
+-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+-- See the License for the specific language governing permissions and
+-- limitations under the License.
+--
+-- Copyright (C) 2015-present, Xmake Open Source Community.
+--
+-- @author ruki
+-- @file find_icx_cc.lua
+--
+
+-- imports
+import("lib.detect.find_program")
+import("lib.detect.find_programver")
+
+-- find icx-cc
+--
+-- @param opt the argument options, e.g. {version = true}
+--
+-- @return program, version
+--
+function main(opt)
+ opt = opt or {}
+ local program = find_program(opt.program or "icx-cc", opt)
+ local version = nil
+ if program and opt.version then
+ version = find_programver(program, opt)
+ end
+ return program, version
+end
diff --git a/xmake/toolchains/icx/load.lua b/xmake/toolchains/icx/load.lua
index f91bd5348..2f2a03e5b 100644
--- a/xmake/toolchains/icx/load.lua
+++ b/xmake/toolchains/icx/load.lua
@@ -56,23 +56,23 @@ function _load_intel_on_windows(toolchain)
-- set toolset
if toolchain:is_plat("windows") then
- toolchain:set("toolset", "cc", "icx.exe")
- toolchain:set("toolset", "cxx", "icx.exe")
+ toolchain:set("toolset", "cc", "icx-cc.exe")
+ toolchain:set("toolset", "cxx", "icx-cc.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", "ld", "icx-cc.exe")
+ toolchain:set("toolset", "sh", "icx-cc.exe")
+ toolchain:set("toolset", "ar", "llvm-ar.exe")
else
toolchain:set("toolset", "cc", "icx")
toolchain:set("toolset", "cxx", "icpx", "icx")
toolchain:set("toolset", "ld", "icpx", "icx")
toolchain:set("toolset", "sh", "icpx", "icx")
- toolchain:set("toolset", "ar", "ar")
+ toolchain:set("toolset", "ar", "llvm-ar", "ar")
toolchain:set("toolset", "strip", "strip")
toolchain:set("toolset", "as", "icx")
end