C++ Compilers: Systematize handling of standard libraries

This commit is contained in:
John Ericson
2020-06-22 04:24:44 +00:00
committed by John Ericson
parent e00d4d6021
commit f3f7612a40
29 changed files with 150 additions and 199 deletions
+1 -1
View File
@@ -258,7 +258,7 @@ stdenv.mkDerivation {
buildPhase = ''
# gcc-6.4.0/include/c++/6.4.0/cstdlib:75:15: fatal error: 'stdlib.h' file not found
export NIX_CFLAGS_COMPILE="$( echo ${clang.default_cxx_stdlib_compile} ) $NIX_CFLAGS_COMPILE"
export NIX_CFLAGS_COMPILE="$(< $NIX_CC/nix-support/libcxx-cxxflags) $NIX_CFLAGS_COMPILE"
# During the Swift build, a full local LLVM build is performed and the resulting clang is invoked.
# This compiler is not using the Nix wrappers, so it needs some help to find things.
export NIX_LDFLAGS_BEFORE="-rpath ${clang.cc.gcc.lib}/lib -L${clang.cc.gcc.lib}/lib $NIX_LDFLAGS_BEFORE"