Merge pull request #139697 from oxalica/bp/fix/to-rust-target

[21.05] fix toRustTarget for windows
This commit is contained in:
Jörg Thalheim 2021-09-28 09:37:55 +01:00 committed by GitHub
commit 96bf839ef6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -37,8 +37,11 @@
"armv6l" = "arm";
"armv5tel" = "armv5te";
}.${cpu.name} or cpu.name;
vendor_ = platform.rustc.platform.vendor or {
"w64" = "pc";
}.${vendor.name} or vendor.name;
in platform.rustc.config
or "${cpu_}-${vendor.name}-${kernel.name}${lib.optionalString (abi.name != "unknown") "-${abi.name}"}";
or "${cpu_}-${vendor_}-${kernel.name}${lib.optionalString (abi.name != "unknown") "-${abi.name}"}";
# Returns the name of the rust target if it is standard, or the json file
# containing the custom target spec.