Repository navigation
Conversation
3b24a2e to
bc03a97
Compare
bc03a97 to
175b4c1
Compare
175b4c1 to
1656cb7
Compare
test/bundle_interface/*.wi fixtures are compared byte-for-byte against the compiler's freshly-emitted interface. Under core.autocrlf=true (GitHub's Windows runners' default) a native Windows checkout rewrites the checked-in fixture's LF to CRLF, so every read line carries a trailing "\r" the emitted (LF) interface never has -- the byte-exact comparison then fails on every line and reds bundle-interface-tests on Windows only, while it passes on Linux/mac. Root cause: the .wi fixtures were never covered by an eol=lf attribute, unlike *.w and docs/with-abi.sha256 (#942). Pin *.wi text eol=lf so the checked-out fixture bytes match emitted output on every platform. No CRLF exists in any .wi blob today, so the pin is a no-op on Linux/mac and only corrects the Windows checkout.
The pcre2test.w .wo corpus harness is migrated once from the host's preprocessed C and checked in for every platform. It was migrated on Darwin, whose <stdio.h> does `#define stderr __stderrp` (also __stdoutp / __stdinp), so the checked-in harness references the bare symbols __stdinp / __stdoutp / __stderrp (91 sites). Windows/UCRT has neither those symbols nor stdin/stdout/stderr global variables -- the FILE* streams come from __acrt_iob_func(0/1/2) -- so on Windows those three symbols had no producer and the pcre2-wo-drift lane failed to link the harness. Red on both Windows lanes (x86_64 and aarch64), green on Darwin and (after the glibc fix) Linux. Root cause: the Darwin-spelled stdio globals have no producer on Windows. Fix mirrors the glibc analogue already in rt/linux_x86_64.w and the existing __error / __open darwin-compat precedent: rt/windows_x86_64.w and rt/windows_aarch64.w declare `extern fn __acrt_iob_func(index: u32)`, define `pub var __stdinp / __stdoutp / __stderrp`, and bind them to __acrt_iob_func(0/1/2) in rt_store_args, the guaranteed pre-main entry hook. codegen_is_runtime_abi_symbol (src/FnAbi.w) already whitelists the three names (added with the glibc fix) and codegen_is_runtime_source_file already matches rt/ and rt\ paths, so the `pub var` definitions keep their bare link names in module-object mode and satisfy the harness's bare references. No FnAbi.w change, so docs/with-abi.sha256 is unchanged and no bundle re-keys. Verified by cross-emitting rt/windows_x86_64.w to a COFF object: nm shows __stdinp / __stdoutp / __stderrp as bare BSS symbols, __acrt_iob_func as an undefined UCRT import, and rt_store_args (the binder) defined. No platform gate, no skip.
1656cb7 to
c8b0c36
Compare
…dows stays at v0.15.1.8 (#1029) v0.15.1.10 (release run 33924828956) is the v0.15.1.9 tree plus the build-runner retry and the evaluator-friendly .wo action hash, built from the v0.15.1.8 seeds; linux-aarch64 bootstrapped for the first time since C3 (#1074 closed). Both Windows jobs failed in the pcre2 bundle build on the Darwin stdio globals (#1029), so the Windows pins keep their v0.15.1.8 override and those lanes stay red until that lands. `with build :seed-compat` is green against v0.15.1.10 (stage1 of the tree copy).
|
Landed in Rob's batch on main (commits 6b338ca/46d00a35: __std{in,out,err}p on non-Darwin and Windows backends; 130630e pins .wi fixtures to LF). Verified on the Linux lanes; the Windows pcre2-wo-build still fails, but on a different cause now visible via #1035: 'missing Windows LLVM linker metadata' (#1075), not the stdio globals. Closing the stdio-globals/CRLF part here; the remaining Windows red is tracked in #1075. |
|
Landed on main via cherry-pick under new hashes: 80fa7fe (gitattributes: pin .wi interface fixtures to LF) and 72e7355 (rt: define Darwin stdio globals on Windows backends). Closing as merged-by-content; original SHAs differ because it was cherry-picked, not merged. Note: the Windows self-host lane is still red, but on a different, deeper cause now — #1081 (compiler |
What
Fixes the two remaining Windows-only reds in the pcre2/bundle-interface red wave,
on both Windows lanes (x86_64 and aarch64). Stacked on #1016.
bundle-interface-tests— CRLF on an unpinned.wifixture.pcre2-wo-drift— the Darwin-migrated stdio globals__std{in,out,err}phave no producer on Windows.
Both are architecture-independent: they fail identically on windows-x86_64 and
windows-aarch64, and pass on Linux and macOS.
Rung D — pin
.wiinterface fixtures to LFtest/bundle_interface/*.wifixtures are compared byte-for-byte against thecompiler's freshly-emitted interface. Under
core.autocrlf=true(GitHub'sWindows runners' default) a native Windows checkout rewrites the checked-in
fixture's LF to CRLF, so every read line carries a trailing
\rthe emitted (LF)interface never has — the byte-exact comparison then fails on every line and reds
bundle-interface-testson Windows only.The
.wifixtures were simply never covered by aneol=lfattribute, unlike*.wanddocs/with-abi.sha256(#942). Fix: add*.wi text eol=lfto.gitattributes. No.wiblob has CRLF today, so the pin is a no-op onLinux/mac and only corrects the Windows checkout. Same class as #942.
Rung E — define
__std{in,out,err}pon Windows backendsThe
pcre2test.w.wocorpus harness is migrated once from the host'spreprocessed C and checked in for every platform. It was migrated on Darwin,
whose
<stdio.h>does#define stderr __stderrp(also__stdoutp/__stdinp),so the checked-in harness references the bare symbols
__stdinp/__stdoutp/__stderrp(91 sites). Windows/UCRT has neither those symbols norstdin/stdout/stderrglobal variables — theFILE*streams come from__acrt_iob_func(0/1/2)— so on Windows those three symbols had no producerand the harness link failed. #1016 fixed the same class for glibc; this is its
Windows twin.
Fix mirrors the glibc analogue now in
rt/linux_x86_64.wand the existing__error/__opendarwin-compat precedent:rt/windows_x86_64.w,rt/windows_aarch64.w: declareextern fn __acrt_iob_func(index: u32), definepub var __stdinp / __stdoutp / __stderrp, and bind them to__acrt_iob_func(0/1/2)inrt_store_args, theguaranteed pre-main entry hook.
src/FnAbi.wchange:codegen_is_runtime_abi_symbolalready whiteliststhe three names (added with the glibc fix in rt: define Darwin stdio globals (__std{in,out,err}p) on non-Darwin backends #1016) and
codegen_is_runtime_source_filealready matchesrt/andrt\paths, so thepub vardefinitions keep their bare link names in module-object mode andsatisfy the harness's bare references.
docs/with-abi.sha256is thereforeunchanged and no bundle re-keys.
No platform gate, no skip: the Darwin-spelled globals now resolve on every target.
Verification
git check-attr text eol -- test/bundle_interface/wi_demo.wi→text: set/eol: lf; no.wiblob contains CRLF.rt/windows_x86_64.wto a COFF object;nmshows__stdinp/__stdoutp/__stderrpas bare BSS symbols,__acrt_iob_funcas an undefined UCRT import, and
rt_store_args(the binder) defined. Theedits are structurally identical for aarch64.
.gitattributesnorrt/windows_*.wis compiled into the host compiler.