[PATCH] D137043: [clang] add implicit include for Linux/gnu compatibility

Tao Liang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Nov 17 18:19:22 PST 2022


Origami404 added a comment.

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?

> 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?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137043



More information about the cfe-commits mailing list