From fc0456bed1372ccff51fc6fd578e5d2a09d64534 Mon Sep 17 00:00:00 2001 From: Andrew Childs Date: Thu, 19 Nov 2020 16:57:29 +0900 Subject: [PATCH] cc-wrapper: set -arch on darwin --- pkgs/build-support/cc-wrapper/default.nix | 4 ++++ 1 file changed, 4 insertions(+) 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 ##