Skip to content

[build] Enable ISA extensions globally in release builds - #6243

Merged
fhanau merged 1 commit into
mainfrom
felix/030326-bazel-crc
Nov 23, 2026
Merged

fhanau merged 1 commit into
mainfrom
felix/030326-bazel-crc

Conversation

@fhanau

@fhanau fhanau commented Mar 4, 2026 •

Copy link
Copy Markdown
Contributor

As a long-term solution for which hardware flags to enable, we enable the flags we need on all of workerd in release builds. Alongside capnproto/capnproto#2582, this should fix the footgun responsible for #5977 for good as the CRC-based hash is only used when all of workerd is built with the given CPU flags.

This has been up for too long, I finally got back to it since the inconsistent flags apparently cause an issue with JSG C++ <-> Rust inlining.

@fhanau
fhanau requested a review from mikea March 4, 2026 21:17
@fhanau
fhanau requested review from a team as code owners March 4, 2026 21:17
@ask-bonk

ask-bonk Bot commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

ResolveMessage: Cannot find module '@opencode-ai/plugin' from '/home/runner/work/workerd/workerd/.opencode/tools/bazel-deps.ts'

github run

@ask-bonk

ask-bonk Bot commented Mar 4, 2026

Copy link
Copy Markdown
Contributor

@fhanau Bonk workflow failed. Check the logs for details.

View workflow run · To retry, trigger Bonk again.

@github-actions

github-actions Bot commented Mar 4, 2026 •

Copy link
Copy Markdown

The generated output of @cloudflare/workers-types matches the snapshot in types/generated-snapshot 🎉

@clanky-the-clanker clanky-the-clanker Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superseded by the review of 6fd52b4f.

This review, of 29ef6d57

✅ Approved — The config chains and workflow references are consistent, and no issues were found in the changed files.

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


✅ All checks passed

📋 Code Quality: ✅ LGTM

The .bazelrc config chains resolve as intended, and every config the workflows reference is defined. The capnproto dependency bump goes with the new kj_crc32_hash flag.


📝 Documentation: ✅ LGTM

The new .bazelrc comments describe the configs accurately.


Reviewed commit: 29ef6d57

@fhanau
fhanau force-pushed the felix/030326-bazel-crc branch from 29ef6d5 to 6fd52b4 Compare November 20, 2026 01:12

@clanky-the-clanker clanky-the-clanker Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superseded by the review of fee793d6.

This review, of 6fd52b4f

✅ Approved — The config chains, host and target ISA flags, workflow references and capnproto pin are consistent, and no issues were found.

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


✅ All checks passed

📋 Code Quality: ✅ LGTM

Every config the workflows reference is defined in .bazelrc. Each release config sets the host copt that matches its target copt, and the x64 cross-build uses -mcrc for its arm64 host. The older release_linux/release_macos configs that other scripts still use don't turn on the CRC hash, so those builds stay correct. The capnproto pin goes with the new kj_crc32_hash flag.


📝 Documentation: ✅ LGTM

The new .bazelrc comments describe the configs accurately.


Reviewed commit: 6fd52b4f

As a long-term solution for which hardware flags to enable, we enable the flags
we need on all of workerd in release builds. Alongside capnproto/capnproto#2582,
this should fix the footgun responsible for #5977 for good as the CRC-based hash
is only used when all of workerd is built with the given CPU flags.
@fhanau
fhanau force-pushed the felix/030326-bazel-crc branch from 6fd52b4 to fee793d Compare November 23, 2026 21:57

@clanky-the-clanker clanky-the-clanker Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Approved — The new release configs, host and target ISA flags, workflow references and capnproto pin all agree with each other, and no issues were found.

The decision is advisory: this review is a comment and never approves, blocks or requests changes on the pull request.


✅ All checks passed

🔒 Security: ✅ LGTM

The change only adds CPU-feature compiler flags and the kj_crc32_hash option to release builds. The capnproto dependency is still pinned to an exact commit with a sha256 integrity hash.


📋 Code Quality: ✅ LGTM

Each new release config sets a host copt that matches its target copt. The macOS x64 cross-build uses -mcrc for its arm64 host. The new release_linux_* and release_macos_* configs build on the existing release configs, and release_windows pulls in x64-release. Every config the workflows reference is defined in .bazelrc. The capnproto pin's commit, sha256 and strip_prefix all change together.


📝 Documentation: ✅ LGTM

The new .bazelrc comments describe the configs accurately.


Reviewed commit: fee793d6

@fhanau
fhanau merged commit 744d280 into main Nov 23, 2026
36 of 39 checks passed
@fhanau
fhanau deleted the felix/030326-bazel-crc branch November 23, 2026 23:37
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.

4 participants