drodriguez wrote:

> With that being said, can you clarify what you mean by "ignoring the 
> command-line option", and can you expand on why the current state of upstream 
> Clang is broken in your opinion? But for productivity's sake, let's take for 
> granted that the canonical state is upstream Clang and let's pretend that 
> AppleClang also behaves the same (which is not quite true yet).

I speak only for myself, but I find very confusing that `/bar/bin/clang 
-isysroot /foo` will ignore the headers provided in `/foo/usr/include/c++/v1` 
when they exist just because `/bar/include/c++/v1` exists. An additional 
problem is that there is no flag to say 
`-ignore-the-toolchain-c++-headers-and-use-sysroot-I-mean-it` so someone can 
have a toolchain with C++ headers, but still prefer some external headers in 
the SDK.

In a particular case, when developing, one can end up with a build directory 
that has created an empty `<build dir>/include/c++/v1` (because libc++ has been 
configured, but not built), and `<build dir>/bin/clang` will only look at that 
directory instead of the one provided in `SDKROOT` or `-isysroot`, failing 
every time that C++ headers are referenced (because they are not actually 
there).

https://github.com/llvm/llvm-project/pull/80524
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to