rust.toRustTarget: fix for windows

change vendor from "w64" to "pc"
broken since 91718534f1

(cherry picked from commit d89c29deb8ae6baa96443caa3857c2039b3ab86d)
This commit is contained in:
Robin Stumm 2021-08-18 15:45:28 +02:00 committed by oxalica
parent 1224e4bec7
commit c9049f71dd
No known key found for this signature in database
GPG Key ID: CED392DE0C483D00
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.