Skip to content

Commit 5e8108b

Browse files
authored
Merge pull request #6416 from SirLynix/rust-targetriple
Make rustc target_triple public
2 parents 5e3c763 + e0b4e4e commit 5e8108b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

xmake/modules/private/tools/rust/target_triple.lua renamed to xmake/modules/core/tools/rustc/target_triple.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,9 @@ end
4545
function _translate_plat(plat, arch, opt)
4646
if plat == "windows" then
4747
return "-pc-windows-msvc"
48-
elseif plat == "mingw" then
48+
elseif plat == "mingw" or plat == "msys" then
4949
return "-pc-windows-gnu"
50-
elseif plat == "linux" then
50+
elseif plat == "linux" or plat == "cross" then
5151
return "-unknown-linux-gnu"
5252
elseif plat == "macosx" then
5353
return "-apple-darwin"

xmake/modules/package/manager/cargo/install_package.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
-- imports
2222
import("core.base.option")
2323
import("core.project.config")
24+
import("core.tools.rustc.target_triple")
2425
import("lib.detect.find_tool")
2526
import("private.tools.rust.check_target")
26-
import("private.tools.rust.target_triple")
2727

2828
-- translate local path in dependencies
2929
-- @see https://github.com/xmake-io/xmake/issues/4222

xmake/toolchains/rust/xmake.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ toolchain("rust")
2828
set_toolset("rcar", "$(env RC)", "rustc")
2929

3030
on_load(function (toolchain)
31-
import("private.tools.rust.target_triple")
31+
import("core.tools.rustc.target_triple")
3232

3333
local opt = {}
3434
if toolchain:config("appledev") == "simulator" then

0 commit comments

Comments
 (0)