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
fix(toolchain): the compatibility fallback read a file this change deleted
Three defects, all found by CI in configurations this developer machine does
not have. Each is the same shape: a repair placed where the control flow, or
the machine state, does not reach it.
1. baked_runtime_binding read gcc's `specs` and clang's `.cfg` -- files mcpp
used to write and no longer does. On a machine whose toolchain was
installed after that change they are simply absent, so no binding resolved,
so no payload paths, so no `--dynamic-linker`, so the artifact took the
HOST loader and the hermetic check rejected it:
/lib64/ld-linux-x86-64.so.2 (outside the sandbox)
Every existing machine still has those files from before, which is exactly
why local verification was green and CI was not. The binding now also comes
from the compiler's own PT_INTERP -- written by the patchelf walk, which
still runs on every install, and naming the same glibc payload the specs
used to name. Read with a small ELF header reader rather than
`patchelf --print-interpreter`: this runs during prepare, where patchelf is
not guaranteed to be resolved.
Verified by moving the specs file aside and rebuilding: binding still
resolves, artifact still takes the payload loader.
2. probe_sysroot accepted gcc's reported sysroot as soon as it existed and
carried headers, and only consulted remap_xlings_baked_sysroot when it did
not exist. So the ownership predicate added for that function -- the whole
point of which is a sysroot that EXISTS and belongs to someone else -- was
never reached in the case it was written for. Measured on this machine: gcc
reported a sysroot under an unrelated repo and every build took its headers.
Ownership is now asked first; a foreign-but-usable sysroot remains the last
resort, since taking nothing would break machines with no registry subos.
3. `rel.native().rfind("..", 0)` does not compile on Windows, where native()
is a wstring -- every Windows job failed to build. It was also subtly wrong
where it did compile: a directory named `..cache` is not an escape.
Containment is a question about path components, so path_is_under asks it
of components.
Also removes a duplicated flag group: the C-runtime flags were emitted both as
link_toolchain_flags and again as payload_ld for gcc. Correct but wasteful,
and the link line has a hard 128KiB ceiling that real workspaces already spend
43% of.
gcc with specs / gcc without specs / llvm: payload interpreter, exactly one
--dynamic-linker, program runs.
65 unit tests, e2e 201/86/200/65/100/28/30.
0 commit comments