Merge pull request #134946 from dermetfan/rust-target-windows

fix toRustTarget for windows
This commit is contained in:
Timothy DeHerrera
2021-08-20 07:27:48 -06:00
committed by GitHub
2 changed files with 4 additions and 2 deletions
-1
View File
@@ -10,7 +10,6 @@
, importCargoLock
, rustPlatform
, callPackage
, remarshal
, git
, rust
, rustc
+4 -1
View File
@@ -38,8 +38,11 @@
"armv5tel" = "armv5te";
"riscv64" = "riscv64gc";
}.${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.