summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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