|
2 | 2 | // core (workspace -> toolchain -> dependency resolution -> features -> |
3 | 3 | // modgraph -> fingerprint -> plan -> lockfile). |
4 | 4 | // |
5 | | -// LAYOUT. This file is the primary interface: exported types, and |
6 | | -// prepare_build's own exported declaration (default arguments included — |
7 | | -// they belong on the declaration, not the definition). Nothing else. The |
8 | | -// implementation lives under src/build/prepare/: |
9 | | -// state.cppm implementation partition `:state` — PrepareState (the |
10 | | -// working state every phase reads and writes, by |
11 | | -// reference, in place of prepare_build's former ~180 |
12 | | -// locals) and the phase functions' declarations. |
13 | | -// driver.cpp prepare_build's definition: construct PrepareState, |
14 | | -// call each phase in order, return the last one's result. |
15 | | -// manifest.cpp P0 — manifest and workspace resolution. |
16 | | -// toolchain.cpp P1, P2, P5 — toolchain spec, the toolchain resolver |
17 | | -// closure (P2 defines it, P5 calls it), the toolchain |
18 | | -// decision once the graph exists. |
19 | | -// xlings.cpp P3 — xlings payload before the graph. |
20 | | -// graph_load.cpp P4a — the git/path/version dependency loader |
21 | | -// (loadVersionDep), called from graph.cpp. |
22 | | -// graph.cpp P4b — the worklist engine and cycle detection that |
23 | | -// call it. |
24 | | -// features.cpp P6-P8 — feature activation, capability/ABI |
25 | | -// accumulation, target side, host-tool provisioning. |
26 | | -// target_side.cpp P9 — the target side, resolved once against the graph. |
27 | | -// scan.cpp P11 — the modgraph scan, validation, fingerprint. |
28 | | -// plan.cpp P13 — BuildContext: plan, assembly, Windows resources, |
29 | | -// the global cache, mcpp.lock, resolution.json. |
30 | | -// |
31 | | -// A GCC 16.1 CONSTRAINT SHAPES ALL OF THIS. Verified locally (archived on |
32 | | -// branch wip/prepare-split; see the mcpp repository's `upstream`-labelled GCC |
33 | | -// issue for the minimal reproduction): inserting a new INTERFACE unit into |
| 5 | +// LAYOUT. This file is the primary interface: the exported types, the exported |
| 6 | +// inline functions, and the declarations of every other exported function, |
| 7 | +// default arguments included (they belong on the declaration, not the |
| 8 | +// definition). Nothing else is defined here. The implementation lives under |
| 9 | +// src/build/prepare/: |
| 10 | +// state.cppm implementation partition `:state`: PrepareState (the |
| 11 | +// working state every phase reads and writes, by |
| 12 | +// reference, in place of prepare_build's former ~180 |
| 13 | +// locals), the phase functions' declarations, and the |
| 14 | +// declarations of the helpers the phases share. |
| 15 | +// driver.cpp prepare_build: construct PrepareState, run the phases |
| 16 | +// in order, return what the last one builds. |
| 17 | +// manifest.cpp P0 -- the manifest and its workspace. |
| 18 | +// toolchain.cpp P1, P2 -- the toolchain specification and target axis; |
| 19 | +// the toolchain resolver's definition. |
| 20 | +// xlings.cpp P3 -- xlings payloads before the graph. |
| 21 | +// graph_load.cpp P4a -- loading one git, path or version dependency. |
| 22 | +// graph.cpp P4b -- the worklist, the graph, the cycle check. |
| 23 | +// toolchain_decision.cpp P5 -- the toolchain, decided once the graph exists. |
| 24 | +// features.cpp P6-P8 -- features, capabilities, host tools, and the |
| 25 | +// dependencies' build programs. |
| 26 | +// target_side.cpp P9, P10 -- the target side and each dependency's link form. |
| 27 | +// scan.cpp P11, P12 -- the module scan, validation, fingerprint. |
| 28 | +// plan.cpp P13 -- the BuildContext, mcpp.lock, resolution.json. |
| 29 | +// config.cpp, options.cpp, toolchain_env.cpp, fetch.cpp |
| 30 | +// the helpers the phases share: manifest merges and |
| 31 | +// feature requests; invocation options; target rows, |
| 32 | +// sysroots and build-program environments; git remotes |
| 33 | +// and xlings provisioning. |
| 34 | +// Every file stays at or below 2,500 lines (.github/tools/check_file_lengths.sh). |
| 35 | +// |
| 36 | +// A GCC 16.1 CONSTRAINT SHAPES ALL OF THIS. Measured locally and recorded in |
| 37 | +// mcpp-community/mcpp#721 (the archived attempt is branch wip/prepare-split): |
| 38 | +// inserting a new INTERFACE unit into |
34 | 39 | // mcpp.build.prepare's import chain — a separately named module, or an |
35 | 40 | // interface partition (`export module mcpp.build.prepare:x;`) — makes GCC |
36 | 41 | // 16.1 segfault in add_imported_namespace while reading `import mcpp.cli;` |
|
0 commit comments