Repository navigation
Commit 34d54ff
committed
prepare.cppm: extract P6-P8 (features, capabilities, target side, host
tools) as one phase function
Cuts feature activation (Cargo-style, additive), capability/ABI
requirement accumulation and binding, the target side resolved once
against the graph, and host-tool provisioning (including the
recursive prepare_build(...) sub-build for a dependency's tool) into
phase6_features_and_host_tools(PrepareState&). Combined into one
phase function rather than three, matching the design's own file
grouping for this range (features.cpp covers P6-P8); the exact phase
count is not load-bearing, only that each cut is behaviour-preserving
and every resulting file stays under the line cap.
The recursive call needed a genuine forward declaration of
prepare_build itself: every phase function is textually inserted
before prepare_build's own definition, so a call to it (not through a
PrepareState closure, unlike resolve_target_toolchain) has nothing to
resolve against without one. First attempt put the declaration inside
PrepareState's anonymous (TU-local) namespace, which cannot hold an
`export` declaration; moved it to right after that namespace closes.
Twelve more members promoted, all newly exposed because P6-P8 crossing
into its own function separates them from P9-P13, which still read
them inline: activeRootFeatures, capProviders/capRequires/capExclusive,
abiRequires/abiRequiresExceptions, deviceSourcesByPackage,
checkVersionFloors (a closure, but a non-escaping one -- promoted only
because P13 calls it by name), resolvedTargetSide, targetSideResolved,
targetSideUsage, cxxLayerProviderIndex. None had a further escaping-
closure capture beyond what P0-P5 already promoted.
Golden fixture diff against the baseline is empty; mcpp test: 129/129.1 parent 5a8e952 commit 34d54ff
1 file changed
Lines changed: 2413 additions & 2395 deletions
0 commit comments