summary refs log tree commit diff
path: root/pkgs/build-support
diff options
context:
space:
mode:
authorEelco Dolstra <eelco.dolstra@logicblox.com>2014-09-24 17:55:05 +0200
committerEelco Dolstra <eelco.dolstra@logicblox.com>2014-09-24 17:55:05 +0200
commit1e6dfdf29c776ddd936314442816752fef1fda91 (patch)
tree13e75853248ea83678ded8aba939f1b481dc4ad1 /pkgs/build-support
parent84a586fa9e6b35fb3d995d6b14c26239cacb1115 (diff)
downloadnixlib-1e6dfdf29c776ddd936314442816752fef1fda91.tar
nixlib-1e6dfdf29c776ddd936314442816752fef1fda91.tar.gz
nixlib-1e6dfdf29c776ddd936314442816752fef1fda91.tar.bz2
nixlib-1e6dfdf29c776ddd936314442816752fef1fda91.tar.lz
nixlib-1e6dfdf29c776ddd936314442816752fef1fda91.tar.xz
nixlib-1e6dfdf29c776ddd936314442816752fef1fda91.tar.zst
nixlib-1e6dfdf29c776ddd936314442816752fef1fda91.zip
clang-wrapper: Remove explicit dependency on libc++
Now libc++ is just another build input propagated from clang-wrapper.
Diffstat (limited to 'pkgs/build-support')
-rw-r--r--pkgs/build-support/clang-wrapper/builder.sh8
-rw-r--r--pkgs/build-support/clang-wrapper/clang-wrapper.sh5
-rw-r--r--pkgs/build-support/clang-wrapper/default.nix6
3 files changed, 4 insertions, 15 deletions
diff --git a/pkgs/build-support/clang-wrapper/builder.sh b/pkgs/build-support/clang-wrapper/builder.sh
index 2dec6c59933b..6a8ea6370dfe 100644
--- a/pkgs/build-support/clang-wrapper/builder.sh
+++ b/pkgs/build-support/clang-wrapper/builder.sh
@@ -70,17 +70,11 @@ fi
 doSubstitute() {
     local src=$1
     local dst=$2
-    local uselibcxx=
-    local uselibcxxabi=
-    if test -n "$libcxx" && echo $dst | fgrep ++; then uselibcxx=$libcxx; fi
-    if test -n "$libcxxabi" && echo $dst | fgrep ++; then uselibcxxabi=$libcxxabi; fi
     # Can't use substitute() here, because replace may not have been
     # built yet (in the bootstrap).
     sed \
         -e "s^@out@^$out^g" \
         -e "s^@shell@^$shell^g" \
-        -e "s^@libcxx@^$uselibcxx^g" \
-        -e "s^@libcxxabi@^$uselibcxxabi^g" \
         -e "s^@clang@^$clang^g" \
         -e "s^@clangProg@^$clangProg^g" \
         -e "s^@binutils@^$binutils^g" \
@@ -151,3 +145,5 @@ cp -p $utils $out/nix-support/utils.sh
 if test -z "$nativeTools"; then
     echo $clang $binutils $libc > $out/nix-support/propagated-user-env-packages
 fi
+
+echo $extraPackages > $out/nix-support/propagated-native-build-inputs
diff --git a/pkgs/build-support/clang-wrapper/clang-wrapper.sh b/pkgs/build-support/clang-wrapper/clang-wrapper.sh
index bad257fd9b06..c375fc951c0f 100644
--- a/pkgs/build-support/clang-wrapper/clang-wrapper.sh
+++ b/pkgs/build-support/clang-wrapper/clang-wrapper.sh
@@ -79,11 +79,6 @@ if test "$NIX_ENFORCE_PURITY" = "1" -a -n "$NIX_STORE"; then
     NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE --sysroot=/var/empty"
 fi
 
-if test -n "@libcxx@"; then
-    NIX_CFLAGS_COMPILE="$NIX_CFLAGS_COMPILE -isystem@libcxx@/include/c++/v1 -stdlib=libc++"
-    NIX_CFLAGS_LINK="$NIX_CFLAGS_LINK -L@libcxx@/lib -stdlib=libc++ -L@libcxxabi@/lib"
-fi
-
 # Add the flags for the C compiler proper.
 extraAfter=($NIX_CFLAGS_COMPILE)
 extraBefore=()
diff --git a/pkgs/build-support/clang-wrapper/default.nix b/pkgs/build-support/clang-wrapper/default.nix
index e61c07ca9d23..c49bc4c08934 100644
--- a/pkgs/build-support/clang-wrapper/default.nix
+++ b/pkgs/build-support/clang-wrapper/default.nix
@@ -7,7 +7,7 @@
 
 { name ? "", stdenv, nativeTools, nativeLibc, nativePrefix ? ""
 , clang ? null, libc ? null, binutils ? null, coreutils ? null, shell ? ""
-, zlib ? null, libcxx ? null
+, zlib ? null, extraPackages ? []
 }:
 
 assert nativeTools -> nativePrefix != "";
@@ -35,9 +35,7 @@ stdenv.mkDerivation {
   utils = ../gcc-wrapper/utils.sh;
   addFlags = ./add-flags;
 
-  inherit nativeTools nativeLibc nativePrefix clang clangVersion libcxx;
-
-  libcxxabi = libcxx.abi or null;
+  inherit nativeTools nativeLibc nativePrefix clang clangVersion extraPackages;
 
   gcc = clang.gcc;
   libc = if nativeLibc then null else libc;