e9d60c5636
Modern compiler will issue a following error whenever '#include <string>' is done: /nix/store/yxpwamjdapjcp53mmsdh1j2c9bc26h4k-libc++-3.7.1/include/c++/v1/string:1938:44: error: 'basic_string<_CharT, _Traits, _Allocator>' is missing exception specification 'noexcept(is_nothrow_copy_constructible<allocator_type>::value)' basic_string<_CharT, _Traits, _Allocator>::basic_string(const allocator_type& __a) ^ /nix/store/yxpwamjdapjcp53mmsdh1j2c9bc26h4k-libc++-3.7.1/include/c++/v1/string:1326:40: note: previous declaration is here _LIBCPP_INLINE_VISIBILITY explicit basic_string(const allocator_type& __a) ^ 1 error generated. This happens because modern clang is more strict about checking exception specification for forward declaration and definition. http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/string?r1=242056&r2=242623&diff_format=h
43 lines
1.1 KiB
Nix
43 lines
1.1 KiB
Nix
{ lib, stdenv, fetch, cmake, libcxxabi, fixDarwinDylibNames, version }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "libc++-${version}";
|
|
|
|
src = fetch "libcxx" "0i7iyzk024krda5spfpfi8jksh83yp3bxqkal0xp76ffi11bszrm";
|
|
|
|
postUnpack = ''
|
|
unpackFile ${libcxxabi.src}
|
|
'';
|
|
|
|
preConfigure = ''
|
|
# Get headers from the cxxabi source so we can see private headers not installed by the cxxabi package
|
|
cmakeFlagsArray=($cmakeFlagsArray -DLIBCXX_CXX_ABI_INCLUDE_PATHS="$NIX_BUILD_TOP/libcxxabi-${version}.src/include")
|
|
'';
|
|
|
|
patches = [
|
|
./darwin.patch
|
|
./r242056.patch
|
|
];
|
|
|
|
buildInputs = [ cmake libcxxabi ] ++ lib.optional stdenv.isDarwin fixDarwinDylibNames;
|
|
|
|
cmakeFlags = [
|
|
"-DLIBCXX_LIBCXXABI_LIB_PATH=${libcxxabi}/lib"
|
|
"-DLIBCXX_LIBCPPABI_VERSION=2"
|
|
"-DLIBCXX_CXX_ABI=libcxxabi"
|
|
];
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
linkCxxAbi = stdenv.isLinux;
|
|
|
|
setupHook = ./setup-hook.sh;
|
|
|
|
meta = {
|
|
homepage = http://libcxx.llvm.org/;
|
|
description = "A new implementation of the C++ standard library, targeting C++11";
|
|
license = "BSD";
|
|
platforms = stdenv.lib.platforms.unix;
|
|
};
|
|
}
|