[WIP] [5/5] support C++20 Modules, support two phase compilation #22555
+3,286
−182
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I split the XXL PR #19940 into several small patches.
This is the fifth patch of Support C++20 Modules, I construct the build graph of compile with C++20 Modules.
Firstly, all files are scanned to generate
.ddi
files. All the.ddi
files are then aggregated to create a.CXXModules.json
file. Subsequently, based on the.CXXModules.json
file and their respective.ddi
files,.modmap
files are generated. Finally, the compilation begins. The two-phase compilation is employed here.Note: To make the code review convenient, I keep only one commit. Due to patch dependencies, it may build and test failed.
I will update the patch after all the prerequisite patches have been merged. At that time, I will then troubleshoot the build and test failures.