2026.10.1.2: a pack states its build, every drive takes the job count, and a unit's compile does not depend on the member selection (#751, #753) - #754
Merged
Conversation
…, and a unit's compile does not depend on the member selection (#751, #753) Implements .agents/docs/2026-10-01-pack-drive-and-selection-independent-compile-design.md. - Every ninja drive takes the job count and the stale-token reclaim from the plan, and is reported whenever the command opened the report, unless its caller states that it writes its own lines (mcpp test's per-test drives). - mcpp pack states its build: package lines, the status row, and Finished before the first Packing line; one Finished for several configurations; the dispatch pass is reported; a pack fills the global dependency cache. - Every package's BMIs lie below its own directory except the root's, as object files do since #233; a unit reads one module map of what it reaches through its imports (a GCC mapper, or a clang/MSVC argument file). - A file a member lists from outside its directory belongs to that member, not to the workspace's virtual root. - Position independence follows the target: every unit of an ELF target that is not freestanding is compiled with -fPIC.
…ch clang 22 can read back from the module; the sandbox verification script of 2026.10.1.2
…nstructs under clang with the MSVC STL
…line, which is how cl.exe reads a command file
…own output, module maps rewritten when they differ, and a workspace addresses a member's outside source by its place in the workspace
This was referenced Oct 1, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Implements
.agents/docs/2026-10-01-pack-drive-and-selection-independent-compile-design.md(revision 2; D1 to D4 accepted as recommended, D5: one pull request). Resolves #751 and #753.A. Every ninja drive of a plan is configured from the plan (#753)
-jfromplan.scheduleNinjaJobsand reclaims staledetach-codegentokens once per build directory per command.BuildOptions::parallelJobsis removed. Measured on 2026.10.1.1:[build] jobs = 3reached ninja frommcpp buildonly;mcpp testandmcpp packran ninja's default.BuildOptions::Report::Region, the default);mcpp test's own drives passCaller.mcpp packbuilds every configuration group, writes oneFinished, then stages and dispatches; the dispatch pass is reported; a failed drive is reported once (report_failed_drive); the global dependency cache is filled after a pack's build (populate_dependency_cache).B. A unit's compile does not depend on the member selection (#751)
Three facts about the whole graph reached other members' commands, so each switch between
--workspaceand-precompiled them:-fmodule-mapper=on GCC,@<build dir>/modmap/<package>-<hash>.modmapon clang and MSVC. A project whose modules are all its own is byte-identical. The global cache now serves qualified BMIs (DepArtifacts::bmiBuildRel).boost.ixxcase).needsPicwas a census of shared link units. Position independence now follows the target: every unit of an ELF target that is not freestanding.Criteria
tests/unit/test_module_address.cpp(5 tests),ObjectAddress.AMembersOutsideSourceIsImmuneToAnotherMemberListingIt(fails without the fix).jobs = 1no-overlap for build/test/pack) and 872 (no recompile across selections, per-source argument-list equality of the build databases, the feature-union exception, a cache-served dependency module). Both fail on 2026.10.1.1 and pass on this branch, locally under GCC 16.1.0 and clang 22.1.8.Measurements before implementation (design section 8)
@filerelative to the database directory; mcppls expands response files and drops module mechanics, including an unexpanded@*.modmap.