diff options
author | Ryan Trinkle <ryan.trinkle@gmail.com> | 2017-07-05 16:18:22 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-05 16:18:22 -0400 |
commit | 7004641566c6c1e11464cec360613341e44cb320 (patch) | |
tree | 760f2a4c5eeda2f53a86c2e1e35e8d82d5fbb2bf /pkgs/stdenv | |
parent | c23dcd72a0a0f5c4e0b63418a8602aa7f131219a (diff) | |
parent | 754c3f6ba4a33cfd4f573c1fee3b5df74ba00ee2 (diff) | |
download | nixlib-7004641566c6c1e11464cec360613341e44cb320.tar nixlib-7004641566c6c1e11464cec360613341e44cb320.tar.gz nixlib-7004641566c6c1e11464cec360613341e44cb320.tar.bz2 nixlib-7004641566c6c1e11464cec360613341e44cb320.tar.lz nixlib-7004641566c6c1e11464cec360613341e44cb320.tar.xz nixlib-7004641566c6c1e11464cec360613341e44cb320.tar.zst nixlib-7004641566c6c1e11464cec360613341e44cb320.zip |
Merge pull request #26974 from obsidiansystems/response-file-parsing-speed
cc-wrapper: improve response file parsing speed
Diffstat (limited to 'pkgs/stdenv')
-rw-r--r-- | pkgs/stdenv/darwin/default.nix | 16 | ||||
-rw-r--r-- | pkgs/stdenv/linux/default.nix | 6 |
2 files changed, 19 insertions, 3 deletions
diff --git a/pkgs/stdenv/darwin/default.nix b/pkgs/stdenv/darwin/default.nix index 03a815109c25..1c0b42886ca3 100644 --- a/pkgs/stdenv/darwin/default.nix +++ b/pkgs/stdenv/darwin/default.nix @@ -54,14 +54,17 @@ in rec { __sandboxProfile = binShClosure + libSystemProfile; }; - stageFun = step: last: {shell ? "${bootstrapTools}/bin/sh", + stageFun = step: last: {shell ? "${bootstrapTools}/bin/bash", overrides ? (self: super: {}), extraPreHook ? "", extraBuildInputs, 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.expand-response-params + ]; 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; @@ -80,7 +86,7 @@ in rec { cc = { name = "clang-9.9.9"; outPath = bootstrapTools; }; }; - preHook = stage0.stdenv.lib.optionalString (shell == "${bootstrapTools}/bin/sh") '' + preHook = stage0.stdenv.lib.optionalString (shell == "${bootstrapTools}/bin/bash") '' # Don't patch #!/interpreter because it leads to retained # dependencies on the bootstrapTools in the final stdenv. dontPatchShebangs=1 @@ -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.expand-response-params ]) ++ (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; |