[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
Tue Sep 20 02:02:16 PDT 2022


ChuanqiXu created this revision.
ChuanqiXu added reviewers: iains, dblaikie, Bigcheese, vsapsai.
ChuanqiXu added projects: clang, clang-modules.
Herald added a project: All.
ChuanqiXu requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay.

This patch tries to make clang to generate the BMI implicitly in the module cache, which allow the user to compile a hello world example in one command line.

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

More importantly, the patch ease the implementation for build system writers, which makes their initial support more easily. For example, in this branch https://github.com/ChuanqiXu9/llvm-project/tree/MyP1689, we can compile the HelloWorld examples by cmake with some little changes.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D134267

Files:
  clang/include/clang/Basic/DiagnosticCommonKinds.td
  clang/lib/Driver/Driver.cpp
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/test/Driver/create_module_cache.cpp
  clang/test/Modules/one-phase-compilation-named-modules.cppm

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D134267.461510.patch
Type: text/x-patch
Size: 7306 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220920/8264f2bb/attachment-0001.bin>


More information about the cfe-commits mailing list