darwin/xcode: provide libc++ from XCode toolchain

We could use our own libc++ here, but it is probably best to use the
provided one to ensure consistency. This fixes some C++ programs when
running aarch64-apple-ios-clang++.
This commit is contained in:
Matthew Bauer 2020-12-09 16:48:00 -06:00 committed by Andrew Childs
parent a6753d0c42
commit 3e7034abb9

View File

@ -41,6 +41,7 @@ rec {
mv cc-cflags.tmp $out/nix-support/cc-cflags
echo "-target ${targetPlatform.config}" >> $out/nix-support/cc-cflags
echo "-isystem ${sdk}/usr/include${lib.optionalString (lib.versionAtLeast "10" sdk.version) " -isystem ${sdk}/usr/include/c++/4.2.1/ -stdlib=libstdc++"}" >> $out/nix-support/cc-cflags
${lib.optionalString (lib.versionAtLeast sdk.version "14") "echo -isystem ${xcode}/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 >> $out/nix-support/cc-cflags"}
'';
}) // {
inherit sdk;