FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[build] Fall back to scalar zlib on CPUs without SIMD ports by Xeonacid · Pull Request #7062 · cloudflare/workerd · GitHub

[build] Fall back to scalar zlib on CPUs without SIMD ports - #7062

Open
Xeonacid wants to merge 1 commit into
cloudflare:mainfrom
Xeonacid:build/zlib-scalar-fallback-other-cpus
Open

[build] Fall back to scalar zlib on CPUs without SIMD ports#7062
Xeonacid wants to merge 1 commit into
cloudflare:mainfrom
Xeonacid:build/zlib-scalar-fallback-other-cpus

Conversation

Copy link
Copy Markdown

build/BUILD.zlib overlays Chromium zlib with ISA-specific SIMD defines and deps, but several select()s only list x86_64 and aarch64. Bazel analysis then fails on any other CPU because those configurable attributes have no matching condition.

The SIMD libraries already no-op when their ADLER32_SIMD_, INFLATE_CHUNK_SIMD_, CRC32_* and DEFLATE_SLIDE_HASH_* defines are unset: the corresponding C files are empty translation units or the generic zlib sources are used instead. Add "//conditions:default": [] so those selects resolve, and skip the x86/ARM-only CRC SIMD deps on other CPUs.

This does not enable RISC-V Vector (or other) zlib optimizations; it only unblocks a portable scalar build.

build/BUILD.zlib overlays Chromium zlib with ISA-specific SIMD
defines and deps, but several select()s only list x86_64 and
aarch64. Bazel analysis then fails on any other CPU because those
configurable attributes have no matching condition.

The SIMD libraries already no-op when their ADLER32_SIMD_*,
INFLATE_CHUNK_SIMD_*, CRC32_* and DEFLATE_SLIDE_HASH_* defines are
unset: the corresponding C files are empty translation units or the
generic zlib sources are used instead. Add "//conditions:default": []
so those selects resolve, and skip the x86/ARM-only CRC SIMD deps
on other CPUs.

This does not enable RISC-V Vector (or other) zlib optimizations; it
only unblocks a portable scalar build.
Xeonacid requested review from a team as code owners August 19, 2026 11:16

github-actions Bot commented Aug 19, 2026
edited
Loading

Copy link
Copy Markdown

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

github-actions Bot added a commit that referenced this pull request Aug 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL