cross stdenv adaptor: Support --host --build --target across the board
Packages get --host and --target by default, but can explicitly request any subset to be passed as needed. See docs for more info. rustc: Avoid hash breakage by using the old (ignored) dontSetConfigureCross when not cross building
This commit is contained in:
committed by
John Ericson
parent
9bfd03eff7
commit
594d264205
@@ -10,6 +10,7 @@
|
||||
, targetPatches
|
||||
, targetToolchains
|
||||
, doCheck ? true
|
||||
, buildPlatform, hostPlatform
|
||||
} @ args:
|
||||
|
||||
let
|
||||
@@ -137,7 +138,8 @@ stdenv.mkDerivation {
|
||||
|
||||
inherit doCheck;
|
||||
|
||||
dontSetConfigureCross = true;
|
||||
${if buildPlatform == hostPlatform then "dontSetConfigureCross" else null} = true;
|
||||
${if buildPlatform != hostPlatform then "configurePlatforms" else null} = [];
|
||||
|
||||
# https://github.com/NixOS/nixpkgs/pull/21742#issuecomment-272305764
|
||||
# https://github.com/rust-lang/rust/issues/30181
|
||||
|
||||
Reference in New Issue
Block a user