summary refs log tree commit diff
path: root/pkgs/build-support/cc-wrapper
diff options
context:
space:
mode:
authorJohn Ericson <John.Ericson@Obsidian.Systems>2017-08-28 11:33:08 -0400
committerJohn Ericson <John.Ericson@Obsidian.Systems>2017-12-30 22:04:23 -0500
commit469fd8983276d851c19827cd9e78a89dd53a5914 (patch)
tree6fac2af13cf6544fb93a1f9bbdbe454d2cd860ad /pkgs/build-support/cc-wrapper
parentf083248290fb1268fba1beb8e1c353c4cb39528d (diff)
downloadnixlib-469fd8983276d851c19827cd9e78a89dd53a5914.tar
nixlib-469fd8983276d851c19827cd9e78a89dd53a5914.tar.gz
nixlib-469fd8983276d851c19827cd9e78a89dd53a5914.tar.bz2
nixlib-469fd8983276d851c19827cd9e78a89dd53a5914.tar.lz
nixlib-469fd8983276d851c19827cd9e78a89dd53a5914.tar.xz
nixlib-469fd8983276d851c19827cd9e78a89dd53a5914.tar.zst
nixlib-469fd8983276d851c19827cd9e78a89dd53a5914.zip
stdenv-setup: Ease the transition with native builds
 - All deps go on the PATH

 - CC and Bintools wrappers with their host != depender's host still get their
   setup hooks run.

 - Environment hooks get applied to all packages

This isn't so elegent, but eases the transition on a very significant
PR.
Diffstat (limited to 'pkgs/build-support/cc-wrapper')
-rw-r--r--pkgs/build-support/cc-wrapper/setup-hook.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/pkgs/build-support/cc-wrapper/setup-hook.sh b/pkgs/build-support/cc-wrapper/setup-hook.sh
index 17877dc262c5..29a7306b9b7e 100644
--- a/pkgs/build-support/cc-wrapper/setup-hook.sh
+++ b/pkgs/build-support/cc-wrapper/setup-hook.sh
@@ -56,8 +56,11 @@
 
 set -u
 
-# Skip setup hook if we're not a build-time dep
-(( "$hostOffset" < 0 )) || return 0
+# Skip setup hook if we're neither a build-time dep, nor, temporarily, doing a
+# native compile.
+#
+# TODO(@Ericson2314): No native exception
+[[ -z ${crossConfig-} ]] || (( "$hostOffset" < 0 )) || return 0
 
 # It's fine that any other cc-wrapper will redefine this. Bash functions close
 # over no state, and there's no @-substitutions within, so any redefined