Skip to content

A tree bundle's build reads the interfaces its modules import on demand (compiler-bundle failed on windows-x86_64) - #3397

Merged
ehartford merged 1 commit into
mainfrom
bundle-windows
Nov 17, 2026
Merged

ehartford merged 1 commit into
mainfrom
bundle-windows

Conversation

@ehartford

Copy link
Copy Markdown
Contributor

Nightly run 44052619700 (main a3559f2), windows-x86_64, :test: compiler-bundle failed, and internals-tests and internals-compiler-tests were skipped with it. A regression from #3393.

error: 'pthread_self' is not imported: `use rt.platform` names only what it selects (§18.2)
 --> src/compiler/LlvmBridge.w:461

Cause. Any --bundle-corpus build read every interface it imports whole. For a migrated corpus that is its own interface check. For a tree bundle it meant the runtime's interface was read whole while the tree's modules were compiled from source; the Windows runtime defines a pthread_self, which then took the name LlvmBridge.w's own extern fn pthread_self declares. An ordinary compile of the same sources reads the runtime's interface on demand and has no such clash.

Fix. A tree bundle's build reads the interfaces its modules import on demand, as a compile of those sources does; its interface check reads the bundle's own sections whole and the others on demand, so both fingerprint passes see one set of declarations. A runtime call the compiler emits on its own has no declaration in such a unit; the manifest records the runtime's own contract for it (it was emitted against this compiler's runtime).

Evidence.

  • Reproduced on the Mac: with check out/compiler-bundle/root.w --target x86_64-w64-windows-gnu --bundle-corpus tree:… gave the nightly's error on main; it is ok with the fix (and for aarch64-linux-gnu). A plain check src/main.w for the Windows target was ok before and after.
  • Host: internals-tests 123 files ok, internals-compiler-tests 3 files ok; the two fingerprints agree.
  • Battery GREEN on e044116; :release-checks green.

The Windows build itself is confirmed only by the next nightly.

…nd, as a compile of the same sources does. Read whole, the Windows runtime's pthread_self took the name LlvmBridge's own extern declares ('pthread_self' is not imported), and compiler-bundle failed on windows-x86_64 (nightly run 44052619700), taking both internals lanes with it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant