You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
A build with no edit after an edit of a one-file module compiles a transitive importer (clang) #1015
A build with no edit after an edit of a one-file module compiles a unit the previous build did not: the transitive importer.
Measured with mcpp 2026.11.22.1 and clang 23.1.3 (.agents/docs/2026-11-26-clang-bmi-cutoff-and-private-fragment-refinement-design.md §2.5); not measured again on 2026.11.26.1.
Project: c is one file (bodies in the interface), imported by b, imported by main.
Build
c
b
main
after an edit of a function body of c (same length)
compiled
compiled
not compiled
the next build, no edit
not compiled
not compiled
compiled
the next two builds, no edit
not compiled
not compiled
not compiled
b's BMI is byte-identical after c's BMI changes, so keep-bmi stops the cascade at the direct importer in the first build. main is then compiled in the next build. A build with no edit is expected to compile nothing.
The cause is not established. A guess: main's object depends on c's BMI, which is replaced during the first build, and main was judged up to date when that build was planned.
To check: mcpp build --verbose after each step above, listing the compiled units; the build record (MCPP_BUILD_RECORD) counts them.
Fixed in mcpp 2026.11.27.1 (#1023). Under clang the depfile names a BMI by the absolute -fprebuilt-module-path, while the graph names it by its relative path, so ninja held two nodes for one file. The edge that writes a BMI now declares the absolute spelling as an implicit output. After an edit of c, the next build compiles c, b and main, and a build with no edit compiles nothing (e2e 1176, SPEC-018 §1 item 6).
Activity
2026.11.27.1: specifications, usage chapters, CHANGELOG and the desig…
speak-agent commentedon Nov 27, 2026
Fixed in mcpp 2026.11.27.1 (#1023). Under clang the depfile names a BMI by the absolute
-fprebuilt-module-path, while the graph names it by its relative path, so ninja held two nodes for one file. The edge that writes a BMI now declares the absolute spelling as an implicit output. After an edit ofc, the next build compilesc,bandmain, and a build with no edit compiles nothing (e2e 1176, SPEC-018 §1 item 6).