fix(agent): the Windows link's lld is named on the work drive in llvm-mingw's own config files #166

Merged
HumanBean merged 1 commit from HumanBean/Beanstalk:fix/windows-cfg-ld-path into main 2026-11-28 19:56:52 +00:00
Owner

#165 (a listing of the folders above the data folder) did not change the Windows link: nightly-282's reports (rp_0981d05acd15b81c, rp_8422c0fbf6673061) fail the same way, lld started from <home>/AppData/Local/<user>/data/builder/tools/tools/llvm-mingw/bin/ld.lld. The sandbox can list neither C:\ nor C:\Users, and LLVM's start looks up Users (an 8.3-like name) in C:\: a program started from the real folder cannot start, whatever is listed below. Only clang starting lld from the work drive can work, and the probe shows the sandbox starts lld from there (lld --version exit 0, and the plain link from clang.exe exit 0).

Longshot's builder removes CCC_OVERRIDE_OPTIONS from every compiler it runs, so the agent names the linker where the builder cannot take it out: llvm-mingw's own config files (bin/*.cfg, which clang reads from its folder: x86_64-w64-windows-gnu.cfg, mingw32-common.cfg, …). Before each sandboxed command on Windows with the work drive, the agent puts a block in each of them:

# beanstalk: the linker on the work drive (begin)
--ld-path=Z:/builder/tools/tools/llvm-mingw/bin/ld.lld.exe
# beanstalk: the linker on the work drive (end)

(WinDrive.WithLinkerOnDrive; the drive letter is the run's, an earlier block is replaced, forward slashes because a config file reads a backslash as an escape.) clang then starts ld.lld.exe by that path, as it is. A file the agent cannot write stays as it was.

The folder listing of #165 stays (it is harmless, and what a sandbox started from the real folder would need for the folders it can change); say if you want it taken out again.

Not built or run here (this PC's rules); WinDrive.WithLinkerOnDrive has checks.

🤖 Generated with Claude Code

#165 (a listing of the folders above the data folder) did not change the Windows link: nightly-282's reports (rp_0981d05acd15b81c, rp_8422c0fbf6673061) fail the same way, lld started from `<home>/AppData/Local/<user>/data/builder/tools/tools/llvm-mingw/bin/ld.lld`. The sandbox can list neither `C:\` nor `C:\Users`, and LLVM's start looks up `Users` (an 8.3-like name) in `C:\`: a program started from the real folder cannot start, whatever is listed below. Only clang starting lld **from the work drive** can work, and the probe shows the sandbox starts lld from there (`lld --version exit 0`, and the plain link from `clang.exe` exit 0). Longshot's builder removes `CCC_OVERRIDE_OPTIONS` from every compiler it runs, so the agent names the linker where the builder cannot take it out: **llvm-mingw's own config files** (`bin/*.cfg`, which clang reads from its folder: `x86_64-w64-windows-gnu.cfg`, `mingw32-common.cfg`, …). Before each sandboxed command on Windows with the work drive, the agent puts a block in each of them: ``` # beanstalk: the linker on the work drive (begin) --ld-path=Z:/builder/tools/tools/llvm-mingw/bin/ld.lld.exe # beanstalk: the linker on the work drive (end) ``` (`WinDrive.WithLinkerOnDrive`; the drive letter is the run's, an earlier block is replaced, forward slashes because a config file reads a backslash as an escape.) clang then starts `ld.lld.exe` by that path, as it is. A file the agent cannot write stays as it was. The folder listing of #165 stays (it is harmless, and what a sandbox started from the real folder would need for the folders it can change); say if you want it taken out again. Not built or run here (this PC's rules); `WinDrive.WithLinkerOnDrive` has checks. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(agent): the Windows link's lld is named on the work drive in llvm-mingw's own config files
Some checks failed
CI / Conventional Commit title (pull_request) Successful in 7s
CI / Workflow lint (actionlint) (pull_request) Successful in 8s
CI / Coordinator tests (pull_request) Failing after 1m50s
CI / Agent build and checks (pull_request) Successful in 2m37s
CI / Coordinator image (pull_request) Successful in 17s
e206aebd77
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
MagicBeanDev/Beanstalk!166
No description provided.