[PATCH] D12646: Add libc++ header path for DarwinClang builds

Kuba Brecka via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 8 04:23:34 PDT 2015


kubabrecka added a comment.

In what scenario exactly are you seeing an issue?  If it's a just-built clang that can't find C++ headers, then you should just build the libcxx project alongside.


================
Comment at: lib/Driver/ToolChains.cpp:290-295
@@ +289,8 @@
+
+      // FIXME: We should really let cmake find this path, e.g.,
+      // assuming we were compiled with clang:
+      // LIBCXX_INCLUDE_DIR=$(dirname $(dirname $(xcrun -f clang))..)/include/c++/v1
+      // libc++ installed along side clang
+      "/Applications/Xcode.app/Contents/Developer/Toolchains/"
+      "XcodeDefault.xctoolchain/usr/include/c++/v1"
+    };
----------------
This is just a default location of Xcode.app and it's wrong to hardcode it, because the user can install Xcode to different locations (or have multiple installations).  Even letting CMake find the path will be wrong, because the location of Xcode is a user's choice.


http://reviews.llvm.org/D12646





More information about the cfe-commits mailing list