swift: fix cflags for finding C++ headers

This commit is contained in:
Michael Roitzsch 2020-07-28 16:01:12 +02:00
parent 3ba617416c
commit 5c1b1e4326

View File

@ -260,8 +260,8 @@ stdenv.mkDerivation {
''; '';
buildPhase = '' buildPhase = ''
# gcc-6.4.0/include/c++/6.4.0/cstdlib:75:15: fatal error: 'stdlib.h' file not found # explicitly include C++ headers to prevent errors where stdlib.h is not found from cstdlib
export NIX_CFLAGS_COMPILE="$(< $NIX_CC/nix-support/libcxx-cxxflags) $NIX_CFLAGS_COMPILE" export NIX_CFLAGS_COMPILE="$(< ${clang}/nix-support/libcxx-cxxflags) $NIX_CFLAGS_COMPILE"
# During the Swift build, a full local LLVM build is performed and the resulting clang is invoked. # 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. # 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" export NIX_LDFLAGS_BEFORE="-rpath ${clang.cc.gcc.lib}/lib -L${clang.cc.gcc.lib}/lib $NIX_LDFLAGS_BEFORE"