[cfe-dev] Why does -nostdinc also remove builtin headers?

Joerg Sonnenberger via cfe-dev cfe-dev at lists.llvm.org
Fri Sep 6 11:17:48 PDT 2019


On Thu, Sep 05, 2019 at 05:21:45PM -0400, Louis Dionne via cfe-dev wrote:
> When passing -nostdinc to Clang, the builtin header search path is also
> removed. I find that surprising, since -nobuiltininc also removes the
> builtin header search path.

The option has been around like that for a long time and quite a bit of
code depends on it. The separation between "builtin" headers and
"system" headers is also quite platform specific, e.g. often
non-existing on the BSDs.

Joerg



More information about the cfe-dev mailing list