Skip to content

Build runfiles trees only for targets bazel runs - #8966

Merged
danlapid merged 1 commit into
mainfrom
dlapid/nobuild-runfile-links
Nov 28, 2026
Merged

danlapid merged 1 commit into
mainfrom
dlapid/nobuild-runfile-links

Conversation

@danlapid

Copy link
Copy Markdown
Collaborator

--nobuild_runfile_links was set only for the ci config. This makes it the default, so local and remote-execution builds also skip writing a runfiles symlink tree for every target they build.

  • bazel test and bazel run still create the tree for each target they run locally; remotely executed tests don't need one.
  • Writing the trees is slow on macOS and on slow disks, and with --remote_download_minimal the symlinks point at outputs that were never downloaded.
  • A binary started straight from bazel-bin after bazel build now finds no runfiles tree. The workerd binary and plain C++ tests don't read runfiles, so only targets that do (such as wd-tests) are affected; start those with bazel run, or build with --build_runfile_links.
  • just lldb-wpt-test, which debugs a wd-test from its runfiles tree, now builds that target with --build_runfile_links.

Checked with bazel test --config=bazelflare //src/workerd/api/tests:blob-test@: passes, and only blob-test@.runfiles_manifest is written locally, no tree.

🤖 Generated with Claude Code

--nobuild_runfile_links was set only for the ci config. Make it the
default, so local and remote-execution builds also skip writing a
runfiles symlink tree for every target they build. `bazel test` and
`bazel run` still create the tree for each target they run locally,
and remotely executed tests don't need one at all.

Writing the trees is slow on macOS and on slow disks, and with
--remote_download_minimal the symlinks point at outputs that were
never downloaded, so the trees cost time and are of no use.

A binary started straight from bazel-bin after `bazel build` now finds
no runfiles tree. The workerd binary and plain C++ tests don't read
runfiles, so this affects only targets that do, such as wd-tests. The
lldb-wpt-test recipe, which debugs a wd-test from its runfiles tree,
now builds that target with --build_runfile_links.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@danlapid
danlapid marked this pull request as ready for review November 28, 2026 01:38
@danlapid
danlapid requested review from a team as code owners November 28, 2026 01:38
@danlapid
danlapid merged commit 7ba38a0 into main Nov 28, 2026
23 of 24 checks passed
@danlapid
danlapid deleted the dlapid/nobuild-runfile-links branch November 28, 2026 01:38
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