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++.
launchpad/nixpkgs/master
Matthew Bauer 4 years ago committed by Andrew Childs
parent a6753d0c42
commit 3e7034abb9
  1. 1
      pkgs/os-specific/darwin/xcode/sdk-pkgs.nix

@ -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;

Loading…
Cancel
Save