Merge pull request #187841 from amjoseph-nixpkgs/pr/rust/toTargetArch

build-support/rust: toTargetArch: strip off endianness
This commit is contained in:
Bernardo Meurer 2022-08-25 10:22:34 -03:00 committed by GitHub
commit fbd067fef0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5,6 +5,8 @@ rec {
toTargetArch = platform:
/**/ if platform ? rustc.platform then platform.rustc.platform.arch
else if platform.isAarch32 then "arm"
else if platform.isMips64 then "mips64" # never add "el" suffix
else if platform.isPower64 then "powerpc64" # never add "le" suffix
else platform.parsed.cpu.name;
# https://doc.rust-lang.org/reference/conditional-compilation.html#target_os