diff options
author | John Ericson <git@JohnEricson.me> | 2021-03-02 15:27:15 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-02 15:27:15 -0500 |
commit | 09d0e10e95600320c64d7c98da554b07f25e0363 (patch) | |
tree | fd0b40538ce6c59f124a794439e62bae3ce9de89 /pkgs/build-support | |
parent | f5bb0053a62674138b2781b3738e5d0056ac29ec (diff) | |
parent | 8feb949ab540130063d1c57db7244024887c4ed9 (diff) |
Merge pull request #114817 from thefloweringash/darwin-arch
darwin: introduce darwinArch, apply in {cc,bintools}-wrappers
Diffstat (limited to 'pkgs/build-support')
-rw-r--r-- | pkgs/build-support/bintools-wrapper/default.nix | 4 | ||||
-rw-r--r-- | pkgs/build-support/cc-wrapper/default.nix | 4 |
2 files changed, 8 insertions, 0 deletions
diff --git a/pkgs/build-support/bintools-wrapper/default.nix b/pkgs/build-support/bintools-wrapper/default.nix index 8fef2ca6624c..c255f43dfcd8 100644 --- a/pkgs/build-support/bintools-wrapper/default.nix +++ b/pkgs/build-support/bintools-wrapper/default.nix @@ -305,6 +305,10 @@ stdenv.mkDerivation { done '' + + optionalString stdenv.targetPlatform.isDarwin '' + echo "-arch ${targetPlatform.darwinArch}" >> $out/nix-support/libc-ldflags + '' + + '' for flags in "$out/nix-support"/*flags*; do substituteInPlace "$flags" --replace $'\n' ' ' diff --git a/pkgs/build-support/cc-wrapper/default.nix b/pkgs/build-support/cc-wrapper/default.nix index c8af8789fccf..06e43b6ea5f1 100644 --- a/pkgs/build-support/cc-wrapper/default.nix +++ b/pkgs/build-support/cc-wrapper/default.nix @@ -481,6 +481,10 @@ stdenv.mkDerivation { substituteAll ${../wrapper-common/utils.bash} $out/nix-support/utils.bash '' + + optionalString stdenv.targetPlatform.isDarwin '' + echo "-arch ${targetPlatform.darwinArch}" >> $out/nix-support/cc-cflags + '' + ## ## Extra custom steps ## |