On Thu, Feb 02, 2023 at 21:24:12 +0100, Harald Anlauf wrote: > Am 25.01.23 um 22:06 schrieb Ben Boeckel via Gcc-patches: > > Hi, > > > > This patch series 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 any > > TU with `export import some_module;` is compiled first. > > > > [P1689R5]: https://isocpp.org/files/papers/P1689R5.html > > while that paper mentions Fortran, the patch in its present version > does not seem to implement anything related to Fortran and does not > touch the gfortran frontend. Or am I missing anything? Otherwise, > could you give an example how it would be used with Fortran?
Correct. Still trying to put the walls back together after modules KoolAid Man'd their way into the build graph structure :) . Being able to drop our Fortran parser (well, we'd have to drop support for Fortran compilers that exist today…so maybe in 2075 or something) and rely on compilers to tell us the information would be amazing though :) . FWIW, the initial revision of the patchset did touch the gfortran frontend, but the new parameter is now defaulted and therefore the callsite doesn't need an update anymore. I still thought it worthwhile to keep the Fortran side aware of what is going on in the space. The link to Fortran comes up because the build graph problem is isomorphic (Fortran supports exporting multiple modules from a single TU, but it's not relevant at the graph level; it's the zero -> any case that is hard), CMake "solved" it already, and C++ is going to have a *lot* more "I want to consume $other_project's modules using my favorite compiler/flags" than seems to happen in Fortran. If you're interested, this is the paper showing how we do it: https://mathstuf.fedorapeople.org/fortran-modules/fortran-modules.html > Thus I'd say that it is OK from the gfortran side. Eventually we'll like to get gfortran supporting this type of scanning, but…as above. Thanks, --Ben