[PATCH] D121589: [C++20][Modules][Driver][HU 2/N] Add fmodule-header, fmodule-header=

Iain Sandoe via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 15 02:25:06 PDT 2022


iains added a comment.

In D121589#3381343 <https://reviews.llvm.org/D121589#3381343>, @ChuanqiXu wrote:

>> It's not practical to recognise a header without any suffix so
>
> -fmodule-header=system foo isn't going to happen.
>
> May I ask the reason? It looks not so good with `-fmodule-header=system -xc++-header vector`

OK. One should never say "never" ;) , it would be nicer if we could avoid this.

... it would require a policy change in the driver - since we cannot recognise files like 'vector' as headers, they are currently unclaimed (which means that they default to being considered as linker inputs).

This is a long-standing (forever, I suspect) situation;
Although we could make it so that if we see certain options, all unknown inputs get claimed as source files (or headers) I wonder how much build system code that might break.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D121589



More information about the cfe-commits mailing list