rustc: Add way to override the arch and config triple for rust

Sometimes it is useful for it to be slightly different. Going forward we
should, however, try to make this fallback rarely needed.
This commit is contained in:
John Ericson 2020-03-12 09:56:55 -04:00
parent 00afca0929
commit 783fa4616e

View File

@ -17,8 +17,9 @@
"armv7a" = "armv7";
"armv7l" = "armv7";
"armv6l" = "arm";
}.${cpu.name} or cpu.name;
in "${cpu_}-${vendor.name}-${kernel.name}${lib.optionalString (abi.name != "unknown") "-${abi.name}"}";
}.${cpu.name} or platform.rustc.arch or cpu.name;
in platform.rustc.config
or "${cpu_}-${vendor.name}-${kernel.name}${lib.optionalString (abi.name != "unknown") "-${abi.name}"}";
makeRustPlatform = { rustc, cargo, ... }: rec {
rust = {