public inbox for
 help / color / mirror / Atom feed
* [PATCH 0/1] RFC: P1689R5 support
@ 2022-09-27 17:10 Ben Boeckel
  2022-09-27 17:10 ` [PATCH 1/1] p1689r5: initial support Ben Boeckel
  0 siblings, 1 reply; 2+ messages in thread
From: Ben Boeckel @ 2022-09-27 17:10 UTC (permalink / raw)
  To: gcc-patches; +Cc: fortran, gcc, brad.king, Ben Boeckel

This patch adds initial support for ISO C++'s [P1689R5][], a format for
describing C++ module requirements and provisions based on the source
code. This is required because compiling C++ with modules is not
embarrassingly parallel and need to be ordered to ensure that `import
some_module;` can be satisfied in time by making sure that the TU with
`export import some_module;` is compiled first.


I'd like feedback on the approach taken here with respect to the
user-visible flags. I'll also note that header units are not supported
at this time because the current `-E` behavior with respect to `import
<some_header>;` is to search for an appropriate `.gcm` file which is not
something such a "scan" can support. A new mode will likely need to be
created (e.g., replacing `-E` with `-fc++-module-scanning` or something)
where headers are looked up "normally" and processed only as much as
scanning requires.

Testing is currently happening in CMake's CI using a prior revision of
this patch (the differences are basically the changelog, some style, and
`trtbd` instead of `p1689r5` as the format name).

For testing within GCC, I'll work on the following:

- scanning non-module source
- scanning module-importing source (`import X;`)
- scanning module-exporting source (`export module X;`)
- scanning module implementation unit (`module X;`)
- flag combinations?

Are there existing tools for handling JSON output for testing purposes?
Basically, something that I can add to the test suite that doesn't care
about whitespace, but checks the structure (with sensible replacements
for absolute paths where relevant)?

For the record, Clang has patches with similar flags and behavior by
Chuanqi Xu here:

with the same flags (though using my old `trtbd` spelling for the
format name).



Ben Boeckel (1):
  p1689r5: initial support

 gcc/ChangeLog           |   9 ++
 gcc/c-family/ChangeLog  |   6 +
 gcc/c-family/  |  40 ++++++-
 gcc/c-family/c.opt      |  12 ++
 gcc/cp/ChangeLog        |   5 +
 gcc/cp/        |   3 +-
 gcc/doc/invoke.texi     |  15 +++
 gcc/fortran/ChangeLog   |   5 +
 gcc/fortran/      |   4 +-
 gcc/         |   2 +-
 gcc/            |   4 +-
 libcpp/ChangeLog        |  11 ++
 libcpp/include/cpplib.h |  12 +-
 libcpp/include/mkdeps.h |  17 ++-
 libcpp/          |  14 ++-
 libcpp/        | 235 ++++++++++++++++++++++++++++++++++++++--
 16 files changed, 368 insertions(+), 26 deletions(-)

base-commit: d812e8cb2a920fd75768e16ca8ded59ad93c172f

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-09-27 17:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-27 17:10 [PATCH 0/1] RFC: P1689R5 support Ben Boeckel
2022-09-27 17:10 ` [PATCH 1/1] p1689r5: initial support Ben Boeckel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).