[PATCH] D134267: [C++] [Modules] Support one phase compilation model for named modules
Chuanqi Xu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 7 20:49:51 PDT 2022
ChuanqiXu added a reviewer: rsmith.
ChuanqiXu added a comment.
In D134267#3815453 <https://reviews.llvm.org/D134267#3815453>, @dblaikie wrote:
>> This also tries to fix the problem I raised a year ago: https://discourse.llvm.org/t/make-command-line-support-for-c-20-module-uniform-with-gcc/59144
>
> I think this thread is fairly different from what this patch is proposing.
>
> @rsmith for discussion of adding effectively implicit modules support for C++20 modules - this seems like a pretty significant design choice, but something we (you and I, SG15, etc) have discussed before in terms of "how do we support 'Hello, World.'" situations without requiring something that amounts to a build system even for the simplest C++20 modules programs. Maybe this is it? But it surprises me a bit, and I don't think the linked thread is sufficiently relevant to draw conclusions about this direction.
I don't understand your point a lot. From my point, the intention of the thread (https://discourse.llvm.org/t/make-command-line-support-for-c-20-module-uniform-with-gcc/59144) are asking why the command line interfaces of clang are clearly more complex than gcc. And @rsmith replies that:
> Currently, Clang lacks two important features here:
>
> 1. Produce a .pcm file and a .o file from a single compilation action.
in https://discourse.llvm.org/t/make-command-line-support-for-c-20-module-uniform-with-gcc/59144/12. And I think this is what this patch tries to do: (generate .pcm file and .o file in one single compilation action).
In fact, this doesn't change the behavior a lot. Previously, when we tried to compile a `*.cppm` directly to `*.o`, the compiler will generate `*.pcm` automatically too! Although the `*.pcm` file is only generated in `/tmp/` files by default. And what this patch did is only to change the default location for `*.pcm` files from `/tmp` to `module cache path`. And it wouldn't affect the original 2 phase compilation model.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134267/new/
https://reviews.llvm.org/D134267
More information about the cfe-commits
mailing list