make libcxxStdenv work on both darwin and linux

This commit is contained in:
Jude Taylor 2015-07-27 14:25:34 -07:00
parent 0a1a015355
commit fa6c8445c7
5 changed files with 10 additions and 3 deletions

View File

@ -34,6 +34,8 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true; enableParallelBuilding = true;
linkCxxAbi = stdenv.isLinux;
setupHook = ./setup-hook.sh; setupHook = ./setup-hook.sh;
meta = { meta = {

View File

@ -1,2 +1,3 @@
linkCxxAbi="@linkCxxAbi@"
export NIX_CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1" export NIX_CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1"
export NIX_CXXSTDLIB_LINK=" -lc++ -lc++abi" export NIX_CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"

View File

@ -29,6 +29,8 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true; enableParallelBuilding = true;
linkCxxAbi = stdenv.isLinux;
setupHook = ./setup-hook.sh; setupHook = ./setup-hook.sh;
meta = { meta = {

View File

@ -1,2 +1,3 @@
linkCxxAbi="@linkCxxAbi@"
export NIX_CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1" export NIX_CXXSTDLIB_COMPILE+=" -isystem @out@/include/c++/v1"
export NIX_CXXSTDLIB_LINK=" -lc++ -lc++abi" export NIX_CXXSTDLIB_LINK=" -stdlib=libc++${linkCxxAbi:+" -lc++abi"}"

View File

@ -134,7 +134,8 @@ in rec {
ln -s ${bootstrapTools}/lib/libc++.dylib $out/lib/libc++.dylib ln -s ${bootstrapTools}/lib/libc++.dylib $out/lib/libc++.dylib
ln -s ${bootstrapTools}/include/c++ $out/include/c++ ln -s ${bootstrapTools}/include/c++ $out/include/c++
''; '';
setupHook = ../../development/compilers/llvm/3.5/libc++/setup-hook.sh; linkCxxAbi = false;
setupHook = ../../development/compilers/llvm/3.6/libc++/setup-hook.sh;
}; };
libcxxabi = stdenv.mkDerivation { libcxxabi = stdenv.mkDerivation {