From d07f30f628f52186aa68b0c918c88aa9ed36f988 Mon Sep 17 00:00:00 2001 From: Ryan Trinkle Date: Thu, 29 Jun 2017 12:06:55 -0400 Subject: cc-wrapper: improve response file parsing speed --- pkgs/stdenv/darwin/default.nix | 12 +++++++++++- pkgs/stdenv/linux/default.nix | 6 ++++++ 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'pkgs/stdenv') diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index 03a815109c25..e62aee9a02da 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -61,7 +61,10 @@ in rec { allowedRequisites ? null}: let thisStdenv = import ../generic { - inherit config shell extraBuildInputs allowedRequisites; + inherit config shell extraBuildInputs; + allowedRequisites = if allowedRequisites == null then null else allowedRequisites ++ [ + thisStdenv.cc.parseResponseFile + ]; name = "stdenv-darwin-boot-${toString step}"; @@ -73,6 +76,9 @@ in rec { nativeTools = true; nativePrefix = bootstrapTools; nativeLibc = false; + buildPackages = lib.optionalAttrs (last ? stdenv) { + inherit (last) stdenv; + }; hostPlatform = localSystem; targetPlatform = localSystem; libc = last.pkgs.darwin.Libsystem; @@ -297,6 +303,9 @@ in rec { inherit shell; nativeTools = false; nativeLibc = false; + buildPackages = { + inherit (prevStage) stdenv; + }; hostPlatform = localSystem; targetPlatform = localSystem; inherit (pkgs) coreutils binutils gnugrep; @@ -319,6 +328,7 @@ in rec { gzip ncurses.out ncurses.dev ncurses.man gnused bash gawk gnugrep llvmPackages.clang-unwrapped patch pcre.out binutils-raw.out binutils-raw.dev binutils gettext + cc.parseResponseFile ]) ++ (with pkgs.darwin; [ dyld Libsystem CF cctools ICU libiconv locale ]); diff --git a/pkgs/stdenv/linux/default.nix b/pkgs/stdenv/linux/default.nix index b116a48a2bd6..c2879d93e17c 100644 --- a/pkgs/stdenv/linux/default.nix +++ b/pkgs/stdenv/linux/default.nix @@ -76,6 +76,9 @@ let else lib.makeOverridable (import ../../build-support/cc-wrapper) { nativeTools = false; nativeLibc = false; + buildPackages = lib.optionalAttrs (prevStage ? stdenv) { + inherit (prevStage) stdenv; + }; hostPlatform = localSystem; targetPlatform = localSystem; cc = prevStage.gcc-unwrapped; @@ -241,6 +244,9 @@ in nativeTools = false; nativeLibc = false; isGNU = true; + buildPackages = { + inherit (prevStage) stdenv; + }; hostPlatform = localSystem; targetPlatform = localSystem; cc = prevStage.gcc-unwrapped; -- cgit 1.4.1