smeenai added a comment.

In https://reviews.llvm.org/D48694#1146232, @EricWF wrote:

> LGTM, but I'm a bit confused. You seem to argue that no system places C++ 
> headers on the default search paths, but also that it would be a problem if 
> such a system did.
>  Why wouldn't the conclusion be true? That is, although C++ includes aren't 
> normally found along the default paths, when they are found, we should still 
> consider them?
>
> That being said, the current behavior of searching certian default include 
> paths first does seem incorrect. So I'm OK with disabling it.
>
> I also agree that we shouldn't necessarily be looking for `vector` header, 
> how about looking for `__config` instead, since it's libc++ specific?


Switching to `__config` is a good idea. I can do that separately, since it 
should be pretty uncontroversial.

For whether it makes sense to search for includes in the system path, that 
boils down to @ldionne's question of whether building libc++abi against a 
system-installed libc++ is supported. I actually don't know the answer to that 
myself ... @dexonsmith and @EricWF, what are your thoughts on that? The current 
search won't find the system-installed libc++ headers on Darwin anyway though, 
where they're placed in the compiler's include directory rather than a system 
include directory.

If we do decide that searching for C++ headers in the system is important, we 
can do two separate find_path calls, to ensure our specified paths are searched 
before the system paths. (We may also want to tweak the second call to actually 
look for the system C++ headers in the right places in that case.)


Repository:
  rCXXA libc++abi

https://reviews.llvm.org/D48694



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to