[clang][driver][clang-cl] Support `--precompile` and `-fmodule-*` options in Clang...
authorSharadh Rajaraman <r.sharadh@outlook.sg>
Tue, 6 Aug 2024 15:05:55 +0000 (16:05 +0100)
committerTobias Hieta <tobias@hieta.se>
Sat, 10 Aug 2024 10:28:36 +0000 (12:28 +0200)
commitb2de37237c9ad0b3efafb101c23b075445a6c4ef
treebc4cbb90aad7a1c53394943b526c661e60e85216
parent5972d4ddf9a66eb2444c048aab1f5896f0a30d15
[clang][driver][clang-cl] Support `--precompile` and `-fmodule-*` options in Clang-CL (#98761)

This PR is the first step in improving the situation for `clang-cl`
detailed in [this LLVM Discourse
thread](https://discourse.llvm.org/t/clang-cl-exe-support-for-c-modules/72257/28).
There has been some work done in #89772. I believe this is somewhat
orthogonal.

This is a work-in-progress; the functionality has only been tested with
the [basic 'Hello World'
example](https://clang.llvm.org/docs/StandardCPlusPlusModules.html#quick-start),
and proper test cases need to be written. I'd like some thoughts on
this, thanks!

Partially resolves #64118.

(cherry picked from commit bd576fe34285c4dcd04837bf07a89a9c00e3cd5e)
clang/docs/StandardCPlusPlusModules.rst
clang/docs/UsersManual.rst
clang/include/clang/Driver/Options.td
clang/test/Driver/cl-cxx20-modules.cppm [new file with mode: 0644]