git.iko.soy/typeable/nixpkgs
on master help sign in
Merge #94160: swift: fix cflags for finding C++ headers

Continuing fallout from commit f3f7612.

commit460b2b81d423f143ca2fbe6cb051dd80c214f109 authorVladimír Čunát <v@cunat.cz> dateMon 3 Aug 2020, 08:59 (6 years ago) parent39076935c1b1e4
1 file changed+2−2
pkgs/development/compilers/swift/default.nix+2−2
pkgs/development/compilers/swift/default.nix+2−2
@@ -260,8 +260,8 @@ stdenv.mkDerivation {
260260 '';
261261
262262 buildPhase = ''
263− # gcc-6.4.0/include/c++/6.4.0/cstdlib:75:15: fatal error: 'stdlib.h' file not found
264− export NIX_CFLAGS_COMPILE="$(< $NIX_CC/nix-support/libcxx-cxxflags) $NIX_CFLAGS_COMPILE"
263+ # explicitly include C++ headers to prevent errors where stdlib.h is not found from cstdlib
264+ export NIX_CFLAGS_COMPILE="$(< ${clang}/nix-support/libcxx-cxxflags) $NIX_CFLAGS_COMPILE"
265265 # During the Swift build, a full local LLVM build is performed and the resulting clang is invoked.
266266 # This compiler is not using the Nix wrappers, so it needs some help to find things.
267267 export NIX_LDFLAGS_BEFORE="-rpath ${clang.cc.gcc.lib}/lib -L${clang.cc.gcc.lib}/lib $NIX_LDFLAGS_BEFORE"