summaryrefslogtreecommitdiff
path: root/xmake/modules/core/tools/rustc
diff options
context:
space:
mode:
authorruki <[email protected]>2025-06-29 21:31:37 +0800
committerruki <[email protected]>2025-06-29 21:31:45 +0800
commit10ff4f1d31a0ab7a9f5d130a16eba445ab3e0b02 (patch)
tree6cc9e178c36bc3b428d014ddd88f2eace46cce92 /xmake/modules/core/tools/rustc
parentd70d59b889e9080ee124d56e07d266c230dbc1f9 (diff)
improve rust target #6574
Diffstat (limited to 'xmake/modules/core/tools/rustc')
-rw-r--r--xmake/modules/core/tools/rustc/target_triple.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/xmake/modules/core/tools/rustc/target_triple.lua b/xmake/modules/core/tools/rustc/target_triple.lua
index 98bc9cf3c..fa2ee6a29 100644
--- a/xmake/modules/core/tools/rustc/target_triple.lua
+++ b/xmake/modules/core/tools/rustc/target_triple.lua
@@ -82,6 +82,12 @@ end
-- @return a valid rustc triple if plat and arch are recognized, nil otherwise
function main(plat, arch, opt)
+ -- is triple? return it directly
+ -- @see https://github.com/xmake-io/xmake/issues/6574
+ if arch:match("%w+%-%w+%-%w+") then
+ return arch
+ end
+
local target_arch = _translate_arch(arch, opt)
if not target_arch then
return