Skip to content

Commit

Permalink
build: bump zlib to 1.3
Browse files Browse the repository at this point in the history
This updates the bundled zlib from 1.2.11 to 1.3.
  • Loading branch information
compnerd committed Oct 31, 2023
1 parent 0e1665a commit a7ff2e5
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 35 deletions.
24 changes: 12 additions & 12 deletions .azure/vs2022.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ resources:
- repository: madler/zlib
endpoint: GitHub
name: madler/zlib
ref: refs/heads/master
ref: refs/tags/v1.3
type: github
- repository: unicode-org/icu
endpoint: GitHub
Expand Down Expand Up @@ -664,28 +664,28 @@ stages:
- task: CMake@1
inputs:
cmakeArgs:
-B $(Agent.BuildDirectory)/zlib-1.2.11
-B $(Agent.BuildDirectory)/zlib-1.3
-D BUILD_SHARED_LIBS=NO
-D CMAKE_BUILD_TYPE=Release
-D CMAKE_C_COMPILER=cl
-D CMAKE_C_FLAGS="/GS- /Oy /Gw /Gy"
-D CMAKE_CXX_COMPILER=cl
-D CMAKE_CXX_FLAGS="/GS- /Oy /Gw Gy"
-D CMAKE_MT=mt
-D CMAKE_INSTALL_PREFIX=$(Build.StagingDirectory)/Library/zlib-1.2.11/usr
-D CMAKE_INSTALL_PREFIX=$(Build.StagingDirectory)/Library/zlib-1.3/usr
-G Ninja
-S $(Build.SourcesDirectory)
-D SKIP_INSTALL_FILES=YES
- task: CMake@1
inputs:
cmakeArgs:
--build $(Agent.BuildDirectory)/zlib-1.2.11
--build $(Agent.BuildDirectory)/zlib-1.3
- task: CMake@1
inputs:
cmakeArgs:
--build $(Agent.BuildDirectory)/zlib-1.2.11 --target install
--build $(Agent.BuildDirectory)/zlib-1.3 --target install
- publish: $(Build.StagingDirectory)
artifact: zlib-$(arch)-1.2.11
artifact: zlib-$(arch)-1.3

- stage: curl
dependsOn: [zlib]
Expand All @@ -704,7 +704,7 @@ stages:
git config --global --add core.autocrlf false
git config --global --add core.symlinks true
- download: current
artifact: zlib-$(arch)-1.2.11
artifact: zlib-$(arch)-1.3
- checkout: curl/curl
fetchDepth: 1
- script: |
Expand Down Expand Up @@ -758,8 +758,8 @@ stages:
-D CURL_ZLIB=YES
-D ENABLE_UNIX_SOCKETS=NO
-D ENABLE_THREADED_RESOLVER=NO
-D ZLIB_ROOT=$(Pipeline.Workspace)/zlib-x64-1.2.11/Library/zlib-1.2.11/usr
-D ZLIB_LIBRARY=$(Pipeline.Workspace)/zlib-x64-1.2.11/Library/zlib-1.2.11/usr/lib/zlibstatic.lib
-D ZLIB_ROOT=$(Pipeline.Workspace)/zlib-x64-1.3/Library/zlib-1.3/usr
-D ZLIB_LIBRARY=$(Pipeline.Workspace)/zlib-x64-1.3/Library/zlib-1.3/usr/lib/zlibstatic.lib
- task: CMake@1
inputs:
cmakeArgs:
Expand Down Expand Up @@ -932,7 +932,7 @@ stages:
- download: current
artifact: curl-$(arch)-7.77.0
- download: current
artifact: zlib-$(arch)-1.2.11
artifact: zlib-$(arch)-1.3
- download: current
artifact: toolchain-amd64
- download: current
Expand Down Expand Up @@ -1102,8 +1102,8 @@ stages:
-D LIBXML2_INCLUDE_DIR=$(Pipeline.Workspace)/libxml2-$(arch)-2.9.12/Library/libxml2-2.9.12/usr/include/libxml2
-D LIBXML2_DEFINITIONS="/DLIBXML_STATIC"
-D CURL_DIR=$(Pipeline.Workspace)/curl-$(arch)-7.77.0/Library/curl-7.77.0/usr/lib/cmake/CURL
-D ZLIB_ROOT=$(Pipeline.Workspace)/zlib-$(arch)-1.2.11/Library/zlib-1.2.11/usr
-D ZLIB_LIBRARY=$(Pipeline.Workspace)/zlib-$(arch)-1.2.11/Library/zlib-1.2.11/usr/lib/zlibstatic.lib
-D ZLIB_ROOT=$(Pipeline.Workspace)/zlib-$(arch)-1.3/Library/zlib-1.3/usr
-D ZLIB_LIBRARY=$(Pipeline.Workspace)/zlib-$(arch)-1.3/Library/zlib-1.3/usr/lib/zlibstatic.lib
- task: CMake@1
inputs:
cmakeArgs:
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/swift-toolchain.yml
Original file line number Diff line number Diff line change
Expand Up @@ -655,27 +655,27 @@ jobs:

- name: Configure zlib
run: |
cmake -B ${{ github.workspace }}/BinaryCache/zlib-1.2.11 `
cmake -B ${{ github.workspace }}/BinaryCache/zlib-1.3 `
-D BUILD_SHARED_LIBS=NO `
-D CMAKE_BUILD_TYPE=Release `
-D CMAKE_C_COMPILER=cl `
-D CMAKE_C_FLAGS="${{ needs.context.outputs.CMAKE_C_FLAGS }}" `
-D CMAKE_CXX_COMPILER=cl `
-D CMAKE_CXX_FLAGS="${{ needs.context.outputs.CMAKE_CXX_FLAGS }}" `
-D CMAKE_MT=mt `
-D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/BuildRoot/Library/zlib-1.2.11/usr `
-D CMAKE_INSTALL_PREFIX=${{ github.workspace }}/BuildRoot/Library/zlib-1.3/usr `
-G Ninja `
-S ${{ github.workspace }}/SourceCache/zlib `
-D SKIP_INSTALL_FILES=YES
- name: Build zlib
run: cmake --build ${{ github.workspace }}/BinaryCache/zlib-1.2.11
run: cmake --build ${{ github.workspace }}/BinaryCache/zlib-1.3
- name: Install zlib
run: cmake --build ${{ github.workspace }}/BinaryCache/zlib-1.2.11 --target install
run: cmake --build ${{ github.workspace }}/BinaryCache/zlib-1.3 --target install

- uses: actions/upload-artifact@v3
with:
name: zlib-${{ matrix.arch }}-1.2.11
path: ${{ github.workspace }}/BuildRoot/Library/zlib-1.2.11/usr
name: zlib-${{ matrix.arch }}-1.3
path: ${{ github.workspace }}/BuildRoot/Library/zlib-1.3/usr

curl:
needs: [context, zlib]
Expand All @@ -696,8 +696,8 @@ jobs:

- uses: actions/download-artifact@v3
with:
name: zlib-${{ matrix.arch }}-1.2.11
path: ${{ github.workspace }}/BuildRoot/Library/zlib-1.2.11/usr
name: zlib-${{ matrix.arch }}-1.3
path: ${{ github.workspace }}/BuildRoot/Library/zlib-1.3/usr

- uses: compnerd/gha-setup-vsdevenv@main
with:
Expand Down Expand Up @@ -740,8 +740,8 @@ jobs:
-D CURL_ZLIB=YES `
-D ENABLE_UNIX_SOCKETS=NO `
-D ENABLE_THREADED_RESOLVER=NO `
-D ZLIB_ROOT=${{ github.workspace }}/BuildRoot/Library/zlib-1.2.11/usr `
-D ZLIB_LIBRARY=${{ github.workspace }}/BuildRoot/Library/zlib-1.2.11/usr/lib/zlibstatic.lib
-D ZLIB_ROOT=${{ github.workspace }}/BuildRoot/Library/zlib-1.3/usr `
-D ZLIB_LIBRARY=${{ github.workspace }}/BuildRoot/Library/zlib-1.3/usr/lib/zlibstatic.lib
- name: Build curl
run: cmake --build ${{ github.workspace }}/BinaryCache/curl-7.77.0
- name: Install curl
Expand Down Expand Up @@ -841,8 +841,8 @@ jobs:
path: ${{ github.workspace }}/BuildRoot/Library/curl-7.77.0/usr
- uses: actions/download-artifact@v3
with:
name: zlib-${{ matrix.arch }}-1.2.11
path: ${{ github.workspace }}/BuildRoot/Library/zlib-1.2.11/usr
name: zlib-${{ matrix.arch }}-1.3
path: ${{ github.workspace }}/BuildRoot/Library/zlib-1.3/usr
- name: Download Compilers
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -1024,8 +1024,8 @@ jobs:
-D LIBXML2_DEFINITIONS="/DLIBXML_STATIC" `
-D LIBXML2_INCLUDE_DIR=${{ github.workspace }}/BuildRoot/Library/libxml2-2.9.12/usr/include/libxml2 `
-D LIBXML2_LIBRARY=${{ github.workspace }}/BuildRoot/Library/libxml2-2.9.12/usr/lib/libxml2s.lib `
-D ZLIB_ROOT=${{ github.workspace }}/BuildRoot/Library/zlib-1.2.11/usr `
-D ZLIB_LIBRARY=${{ github.workspace }}/BuildRoot/Library/zlib-1.2.11/usr/lib/zlibstatic.lib
-D ZLIB_ROOT=${{ github.workspace }}/BuildRoot/Library/zlib-1.3/usr `
-D ZLIB_LIBRARY=${{ github.workspace }}/BuildRoot/Library/zlib-1.3/usr/lib/zlibstatic.lib
- name: Build foundation
run: cmake --build ${{ github.workspace }}/BinaryCache/foundation

Expand Down
16 changes: 8 additions & 8 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -890,14 +890,14 @@ function Build-ZLib($Arch) {

Build-CMakeProject `
-Src $SourceCache\zlib `
-Bin "$($Arch.BinaryCache)\zlib-1.2.11" `
-InstallTo $LibraryRoot\zlib-1.2.11\usr `
-Bin "$($Arch.BinaryCache)\zlib-1.3" `
-InstallTo $LibraryRoot\zlib-1.3\usr `
-Arch $Arch `
-BuildTargets default `
-Defines @{
BUILD_SHARED_LIBS = "NO";
INSTALL_BIN_DIR = "$LibraryRoot\zlib-1.2.11\usr\bin\$ArchName";
INSTALL_LIB_DIR = "$LibraryRoot\zlib-1.2.11\usr\lib\$ArchName";
INSTALL_BIN_DIR = "$LibraryRoot\zlib-1.3\usr\bin\$ArchName";
INSTALL_LIB_DIR = "$LibraryRoot\zlib-1.3\usr\lib\$ArchName";
}
}

Expand Down Expand Up @@ -958,8 +958,8 @@ function Build-CURL($Arch) {
CURL_ZLIB = "YES";
ENABLE_UNIX_SOCKETS = "NO";
ENABLE_THREADED_RESOLVER = "NO";
ZLIB_ROOT = "$LibraryRoot\zlib-1.2.11\usr";
ZLIB_LIBRARY = "$LibraryRoot\zlib-1.2.11\usr\lib\$ArchName\zlibstatic.lib";
ZLIB_ROOT = "$LibraryRoot\zlib-1.3\usr";
ZLIB_LIBRARY = "$LibraryRoot\zlib-1.3\usr\lib\$ArchName\zlibstatic.lib";
}
}

Expand Down Expand Up @@ -1091,8 +1091,8 @@ function Build-Foundation($Arch, [switch]$Test = $false) {
LIBXML2_LIBRARY = "$LibraryRoot\libxml2-2.9.12\usr\lib\$ShortArch\libxml2s.lib";
LIBXML2_INCLUDE_DIR = "$LibraryRoot\libxml2-2.9.12\usr\include\libxml2";
LIBXML2_DEFINITIONS = "/DLIBXML_STATIC";
ZLIB_LIBRARY = "$LibraryRoot\zlib-1.2.11\usr\lib\$ShortArch\zlibstatic.lib";
ZLIB_INCLUDE_DIR = "$LibraryRoot\zlib-1.2.11\usr\include";
ZLIB_LIBRARY = "$LibraryRoot\zlib-1.3\usr\lib\$ShortArch\zlibstatic.lib";
ZLIB_INCLUDE_DIR = "$LibraryRoot\zlib-1.3\usr\include";
dispatch_DIR = "$DispatchBinaryCache\cmake\modules";
} + $TestingDefines)
}
Expand Down
2 changes: 1 addition & 1 deletion default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

<project remote="github" name="Kitware/CMake" path="CMake" groups="notdefault,dependencies" revision="master" />

<project remote="github" name="madler/zlib" path="zlib" revision="refs/tags/v1.2.13" />
<project remote="github" name="madler/zlib" path="zlib" revision="refs/tags/v1.3" />

<project remote="github" name="ninja-build/ninja" path="ninja" groups="notdefault,dependencies" revision="master" />

Expand Down

0 comments on commit a7ff2e5

Please sign in to comment.