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
with build :dev can fail after a runtime-producing target such as :zlib-migrate, even when the bootstrap LLVM bridge is complete.
Reproduction: run :dev, run :zlib-migrate (which populates out/lib), change a compiler source outside the cleanup action's declared inputs, then run :dev again. Stage1 compiles successfully but cannot link: missing LLVM static bridge (need llvm_bridge.o + llvm_ld.rsp + llvm_ld).
Exact cause: build.w's prepare-bootstrap-link-root target records only source inputs and its readiness stamp. Its action deletes out/lib/cimport_stubs.o, but the cache does not track that required absence. Subsequent runtime generation recreates the probe without invalidating cleanup. build --explain prepare-bootstrap-link-root incorrectly reports fresh.
LLDB on a minimal LLVMGetGlobalContext caller stops in link_stage_find_llvm_static_bridge, steps through link_stage_resolve_runtime_root, and observes return registers x0 -> "out/lib", x1 = 7. The exact accepting branch is src/compiler/Link.w:1121: nonempty cimport and platform probes select that directory. The missing LLVM bridge then causes the explicit link failure. Bootstrap-lib contains the complete matching link inputs.
Fix in #1103: invoke the existing cleanup helper inside every actual stage1 build action, with the matching declared write scope. The separate cached preparation target remains for earlier bootstrap tools. Declaring the generated probe as a graph input is unsuitable because it introduces a stage1/runtime/stage2 dependency cycle. No linker fallback or mixed-generation runtime selection is introduced.
Activity
fix(build): prepare bootstrap runtime on every stage1 compile