diff options
| author | ruki <[email protected]> | 2025-05-10 15:55:38 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-05-10 15:55:38 +0800 |
| commit | 5e8108b5b9eb58e4e2e38c3015ea46fc1d4c2c72 (patch) | |
| tree | b764f7dc312890d96341c54b323eb73822f830d5 /xmake/modules | |
| parent | 5e3c763b1ace6ab5e03dfa997cf681857de9993a (diff) | |
| parent | e0b4e4e69b752593f90e03ee1e857092143c712b (diff) | |
Merge pull request #6416 from SirLynix/rust-targetriple
Make rustc target_triple public
Diffstat (limited to 'xmake/modules')
| -rw-r--r-- | xmake/modules/core/tools/rustc/target_triple.lua (renamed from xmake/modules/private/tools/rust/target_triple.lua) | 4 | ||||
| -rw-r--r-- | xmake/modules/package/manager/cargo/install_package.lua | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/xmake/modules/private/tools/rust/target_triple.lua b/xmake/modules/core/tools/rustc/target_triple.lua index 3a83aed7e..ddbf052ea 100644 --- a/xmake/modules/private/tools/rust/target_triple.lua +++ b/xmake/modules/core/tools/rustc/target_triple.lua @@ -45,9 +45,9 @@ end function _translate_plat(plat, arch, opt) if plat == "windows" then return "-pc-windows-msvc" - elseif plat == "mingw" then + elseif plat == "mingw" or plat == "msys" then return "-pc-windows-gnu" - elseif plat == "linux" then + elseif plat == "linux" or plat == "cross" then return "-unknown-linux-gnu" elseif plat == "macosx" then return "-apple-darwin" diff --git a/xmake/modules/package/manager/cargo/install_package.lua b/xmake/modules/package/manager/cargo/install_package.lua index 9f5d069cb..a5fe7f423 100644 --- a/xmake/modules/package/manager/cargo/install_package.lua +++ b/xmake/modules/package/manager/cargo/install_package.lua @@ -21,9 +21,9 @@ -- imports import("core.base.option") import("core.project.config") +import("core.tools.rustc.target_triple") import("lib.detect.find_tool") import("private.tools.rust.check_target") -import("private.tools.rust.target_triple") -- translate local path in dependencies -- @see https://github.com/xmake-io/xmake/issues/4222 |
