summaryrefslogtreecommitdiff
path: root/xmake/toolchains
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/toolchains')
-rw-r--r--xmake/toolchains/icc/check.lua6
-rw-r--r--xmake/toolchains/icx/check.lua4
-rw-r--r--xmake/toolchains/ifort/check.lua4
-rw-r--r--xmake/toolchains/ifx/check.lua4
-rw-r--r--xmake/toolchains/msvc/check.lua16
-rw-r--r--xmake/toolchains/rust/xmake.lua2
6 files changed, 16 insertions, 20 deletions
diff --git a/xmake/toolchains/icc/check.lua b/xmake/toolchains/icc/check.lua
index 002b9e191..a88e309af 100644
--- a/xmake/toolchains/icc/check.lua
+++ b/xmake/toolchains/icc/check.lua
@@ -75,12 +75,12 @@ function _check_vsenv(toolchain)
if pathenv then
paths = path.splitenv(pathenv)
end
- local tool = find_tool("cl.exe", {version = true, force = true, paths = paths, envs = vcvars})
+ local tool = find_tool("cl.exe", {force = true, paths = paths, envs = vcvars})
if tool then
program = tool.program
end
if program then
- return vsver, tool
+ return vsver
end
end
end
@@ -117,7 +117,7 @@ function _check_intel_on_windows(toolchain)
local iclvarsall = iccenv.iclvars
local iclenv = iclvarsall[toolchain:arch()]
if iclenv and iclenv.PATH and iclenv.INCLUDE and iclenv.LIB then
- local tool = find_tool("icl.exe", {force = true, envs = iclenv, version = true})
+ local tool = find_tool("icl.exe", {force = true, envs = iclenv})
if tool then
cprint("checking for Intel C/C++ Compiler (%s) ... ${color.success}${text.success}", toolchain:arch())
toolchain:config_set("varsall", iclvarsall)
diff --git a/xmake/toolchains/icx/check.lua b/xmake/toolchains/icx/check.lua
index c781f5c8a..29fc56a7c 100644
--- a/xmake/toolchains/icx/check.lua
+++ b/xmake/toolchains/icx/check.lua
@@ -75,12 +75,12 @@ function _check_vsenv(toolchain)
if pathenv then
paths = path.splitenv(pathenv)
end
- local tool = find_tool("cl.exe", {version = true, force = true, paths = paths, envs = vcvars})
+ local tool = find_tool("cl.exe", {force = true, paths = paths, envs = vcvars})
if tool then
program = tool.program
end
if program then
- return vsver, tool
+ return vsver
end
end
end
diff --git a/xmake/toolchains/ifort/check.lua b/xmake/toolchains/ifort/check.lua
index ac8f31c6e..e9dd5c133 100644
--- a/xmake/toolchains/ifort/check.lua
+++ b/xmake/toolchains/ifort/check.lua
@@ -75,12 +75,12 @@ function _check_vsenv(toolchain)
if pathenv then
paths = path.splitenv(pathenv)
end
- local tool = find_tool("cl.exe", {version = true, force = true, paths = paths, envs = vcvars})
+ local tool = find_tool("cl.exe", {force = true, paths = paths, envs = vcvars})
if tool then
program = tool.program
end
if program then
- return vsver, tool
+ return vsver
end
end
end
diff --git a/xmake/toolchains/ifx/check.lua b/xmake/toolchains/ifx/check.lua
index 75264e14e..7a10a5865 100644
--- a/xmake/toolchains/ifx/check.lua
+++ b/xmake/toolchains/ifx/check.lua
@@ -75,12 +75,12 @@ function _check_vsenv(toolchain)
if pathenv then
paths = path.splitenv(pathenv)
end
- local tool = find_tool("cl.exe", {version = true, force = true, paths = paths, envs = vcvars})
+ local tool = find_tool("cl.exe", {force = true, paths = paths, envs = vcvars})
if tool then
program = tool.program
end
if program then
- return vsver, tool
+ return vsver,
end
end
end
diff --git a/xmake/toolchains/msvc/check.lua b/xmake/toolchains/msvc/check.lua
index 01a81ad93..37f38b53c 100644
--- a/xmake/toolchains/msvc/check.lua
+++ b/xmake/toolchains/msvc/check.lua
@@ -69,12 +69,12 @@ function _check_vsenv(toolchain)
-- check compiler
local program = nil
- local tool = find_tool("cl.exe", {version = true, force = true, envs = vcvars})
+ local tool = find_tool("cl.exe", {force = true, envs = vcvars})
if tool then
program = tool.program
end
if program then
- return vsver, tool
+ return vsver
end
end
end
@@ -83,16 +83,13 @@ end
-- check the visual studio
function _check_vstudio(toolchain)
- local vs, msvc = _check_vsenv(toolchain)
+ local vs = _check_vsenv(toolchain)
if vs then
if toolchain:is_global() then
config.set("vs", vs, {force = true, readonly = true})
end
toolchain:config_set("vs", vs)
cprint("checking for Microsoft Visual Studio (%s) version ... ${color.success}%s", toolchain:arch(), vs)
- if msvc and msvc.version then
- cprint("checking for Microsoft C/C++ Compiler (%s) version ... ${color.success}%s", toolchain:arch(), msvc.version)
- end
else
cprint("checking for Microsoft Visual Studio (%s) version ... ${color.nothing}${text.nothing}", toolchain:arch())
end
@@ -112,16 +109,15 @@ function _check_vc_build_tools(toolchain, sdkdir)
local vcvars = vcvarsall[toolchain:arch()]
if vcvars and vcvars.PATH and vcvars.INCLUDE and vcvars.LIB then
- -- save vcvars
toolchain:config_set("vcvars", vcvars)
toolchain:config_set("vcarchs", table.orderkeys(vcvarsall))
toolchain:config_set("vs_toolset", vcvars.VCToolsVersion)
toolchain:config_set("vs_sdkver", vcvars.WindowsSDKVersion)
-- check compiler
- local cl = find_tool("cl.exe", {version = true, force = true, envs = vcvars})
- if cl and cl.version then
- cprint("checking for Microsoft C/C++ Compiler (%s) version ... ${color.success}%s", toolchain:arch(), cl.version)
+ local cl = find_tool("cl.exe", {force = true, envs = vcvars})
+ if cl then
+ cprint("checking for Microsoft C/C++ Compiler (%s) ... ${color.success}", toolchain:arch())
end
return vcvars
end
diff --git a/xmake/toolchains/rust/xmake.lua b/xmake/toolchains/rust/xmake.lua
index 76bc64923..3baa998bb 100644
--- a/xmake/toolchains/rust/xmake.lua
+++ b/xmake/toolchains/rust/xmake.lua
@@ -34,7 +34,7 @@ toolchain("rust")
if toolchain:config("appledev") == "simulator" then
opt.apple_sim = true
end
-
+
local target = target_triple(toolchain:plat(), toolchain:arch(), opt)
if target then
toolchain:add("rcflags", "--target=" .. target)