aaronpuchert added a comment.

In D137043#3935526 <https://reviews.llvm.org/D137043#3935526>, @Origami404 
wrote:

> In D137043#3935129 <https://reviews.llvm.org/D137043#3935129>, @aaronpuchert 
> wrote:
>
>> This include-if-exists mechanism seems brittle to me.
>
> Do you mean the way that we used to test a file and include it (inserting 
> `#if __has_include`) is brittle or compilation flags like 
> `--include-if-exists` themselves are?

The mechanism itself. For example, we might include the file even if it doesn't 
belong to the C library implementation that we want to use, just because it's 
there.

>> Can we not make it dependent on the triple, i.e. include the file if we're 
>> using a libc implementation that's known to provide (and require) this file?
>
> I am afarid that without depending on triples, we are not able to distinguish 
> what environment we are in or libc we use.  Can you explain more about this?

I was suggesting to have it depend on the triple, not be independent of it.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D137043/new/

https://reviews.llvm.org/D137043

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

Reply via email to