summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthew Bauer <mjbauer95@gmail.com>2020-12-09 16:48:00 -0600
committerAndrew Childs <lorne@cons.org.nz>2021-05-17 00:27:02 +0900
commit3e7034abb9490e3eff4ec436317f3d6b5f52b8d7 (patch)
tree569524c57be815cc989b384089512d149b81c19c
parenta6753d0c4255b1efa6a941efb3d8d7a39ec956e3 (diff)
downloadnixpkgs-3e7034abb9490e3eff4ec436317f3d6b5f52b8d7.tar
nixpkgs-3e7034abb9490e3eff4ec436317f3d6b5f52b8d7.tar.gz
nixpkgs-3e7034abb9490e3eff4ec436317f3d6b5f52b8d7.tar.bz2
nixpkgs-3e7034abb9490e3eff4ec436317f3d6b5f52b8d7.tar.lz
nixpkgs-3e7034abb9490e3eff4ec436317f3d6b5f52b8d7.tar.xz
nixpkgs-3e7034abb9490e3eff4ec436317f3d6b5f52b8d7.tar.zst
nixpkgs-3e7034abb9490e3eff4ec436317f3d6b5f52b8d7.zip
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++.
-rw-r--r--pkgs/os-specific/darwin/xcode/sdk-pkgs.nix1
1 files changed, 1 insertions, 0 deletions
diff --git a/pkgs/os-specific/darwin/xcode/sdk-pkgs.nix b/pkgs/os-specific/darwin/xcode/sdk-pkgs.nix
index ab934d7eaaa..0512d9dd46a 100644
--- a/pkgs/os-specific/darwin/xcode/sdk-pkgs.nix
+++ b/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;