Skip to content

Bump bundled zlib to v1.3.2 - #530

Open
Jatapiaro wants to merge 1 commit into
google:mainfrom
Jatapiaro:bump-zlib
Open

Jatapiaro wants to merge 1 commit into
google:mainfrom
Jatapiaro:bump-zlib

Conversation

@Jatapiaro

Copy link
Copy Markdown

Bundled zlib v1.2.11 declares cmake_minimum_required(VERSION 2.4.4), which CMake 4 rejects, so configuring with bundled dependencies fails:

CMake Error at third_party/zlib/CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.5 has been removed from CMake.

Changes:

  • Bump third_party/zlib to v1.3.2 (CMake 4 compatible, still provides zlibstatic).
  • MSVC: update the FOLDER properties for zlib's renamed targets (example -> zlib_example). Otherwise configure fails on Windows.
  • CI: add a job that installs CMake 4 and builds and tests with bundled deps on ubuntu-latest and windows-2022. The existing jobs don't catch this because the runners still ship CMake 3.x. Happy to drop it or fold it into the existing jobs if you prefer.

Verified in my fork: the new job passes with zlib v1.3.2 and fails with v1.2.11.

zlib v1.2.11 declares cmake_minimum_required(VERSION 2.4.4), which CMake 4 rejects.
Also add a CI job that builds and tests with CMake 4 and bundled dependencies on Linux and Windows.
Jatapiaro added a commit to thebrowsercompany/gha-google-bloaty that referenced this pull request Nov 9, 2026
Working towards: thebrowsercompany/swift-build#368
Allow building bloaty from a fork via a new bloaty-repository input
(defaults to google/bloaty), so consumers can use a fixed bloaty while
google/bloaty#530 is pending.
Jatapiaro added a commit to thebrowsercompany/gha-google-bloaty that referenced this pull request Nov 10, 2026
Working towards: thebrowsercompany/swift-build#368
Allow building bloaty from a fork via a new bloaty-repository input (defaults to google/bloaty), so consumers can use a fixed bloaty while google/bloaty#530 is pending.

Tests temporarily point at thebrowsercompany/bloaty@4a4fb50.
TODO: switch back to google/bloaty once google/bloaty#530 is merged.
Jatapiaro added a commit to thebrowsercompany/swift-build that referenced this pull request Nov 12, 2026
The Bloaty step fails on CMake 4. The bundled zlib 1.2.11 declares cmake_minimum_required(VERSION 2.4.4), and CMake 4 rejects values lower than 3.5.

This change builds Bloaty 4a4fb50 from thebrowsercompany/bloaty. That commit updates zlib to v1.3.2. The change also pins gha-google-bloaty to 46ce536 (thebrowsercompany/gha-google-bloaty#5) and adds the Bloaty version to the cache key.

When google/bloaty#530 merges, we will go back to google/bloaty.

Dry run: https://github.com/thebrowsercompany/swift-build/actions/runs/42911536488

Fixes #368
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