libcxx: Update to 190100 and build with libc++abi.
This commit is contained in:
parent
2c9f0e059a
commit
e3f2e2e10b
@ -1,19 +1,43 @@
|
||||
{ stdenv, fetchsvn, cmake }:
|
||||
{ stdenv, fetchsvn, cmake, libunwind }:
|
||||
|
||||
let rev = "165151"; in
|
||||
let rev = "190100"; in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
stdenv.mkDerivation rec {
|
||||
name = "libc++-pre${rev}";
|
||||
|
||||
src = fetchsvn {
|
||||
url = "http://llvm.org/svn/llvm-project/libcxx/trunk";
|
||||
inherit rev;
|
||||
sha256 = "00l8xx5nc3cjlmln7c1sy1i4v844has9kbfxrsziwkalzbgwaslz";
|
||||
sha256 = "0hnfvzzrkj797kp9sk2yncvbmiyx0d72k8bys3z7l6i47d37xv03";
|
||||
};
|
||||
|
||||
cxxabi = fetchsvn {
|
||||
url = "http://llvm.org/svn/llvm-project/libcxxabi/trunk";
|
||||
inherit rev;
|
||||
sha256 = "1kdyvngwd229cgmcqpawaf0qizas8bqc0g8s08fmbgwsrh1qrryp";
|
||||
};
|
||||
|
||||
buildInputs = [ cmake ];
|
||||
|
||||
cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ];
|
||||
preConfigure = ''
|
||||
sed -i 's/;cxa_demangle.h//' CMakeLists.txt
|
||||
cp -R ${cxxabi} cxxabi
|
||||
chmod u+w -R cxxabi # umm
|
||||
(export NIX_CFLAGS_COMPILE="-I${libunwind}/include -I$PWD/include";
|
||||
export NIX_CFLAGS_LINK="-L${libunwind}/lib -lunwind";
|
||||
cd cxxabi/lib
|
||||
sed -e s,-lstdc++,, -i buildit # do not link to libstdc++!
|
||||
./buildit
|
||||
mkdir -p $out/lib && cp libc++abi.so.1.0 $out/lib
|
||||
cd $out/lib
|
||||
ln -s libc++abi.so.1.0 libc++abi.so
|
||||
ln -s libc++abi.so.1.0 libc++abi.so.1)
|
||||
'';
|
||||
|
||||
cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release"
|
||||
"-DLIBCXX_LIBCXXABI_INCLUDE_PATHS=${cxxabi}/include"
|
||||
"-DLIBCXX_CXX_ABI=libcxxabi" ];
|
||||
buildPhase = ''NIX_CFLAGS_LINK="-L$out/lib -lc++abi" make'';
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user