#1181·zlib

[cmake] [windows] 共享库构建产生的 DLL 名称与之前的版本和源树中的其他文件不一致

作者: luau-project创建于 2026年2月21日更新于 2026年9月20日

Description

On Windows, building zlib 1.3.2 through CMake as a shared library outputs a dll named z.dll (MSVC) or libz.dll (MinGW/MinGW-w64). Even though I am aware that the CMake support on 1.3.2 went on deep changes (https://GitHub.com/madler/zlib/pull/1027), it seems to be an inconsistency with other files in the source tree and also regarding previous releases.

Current behavior

[!NOTE]

This 1.3.2 behavior is also inconsistent with the dll name defined on Makefile-based builds for MSVC and MinGW-w64:

Expected behavior

The same on zlib 1.3.1, which outputs a dll named zlib1.dll (MSVC) or libzlib1.dll (MinGW/MinGW-w64).

Reproduction

I wrote a GitHub workflow to demonstrate this behavior comparing zlib versions (1.3.1 versus 1.3.2) on both MSVC and MinGW-w64. Log in to GitHub and inspect the runs: https://GitHub.com/luau-project/ci-tests/actions/runs/22265467727

Click here to toggle the workflow ```yaml name: Test on: push jobs: zlib-test: runs-on: windows-latest defaults: run: shell: cmd strategy: fail-fast: false matrix: zlib-version: - 1.3.1 - 1.3.2 toolchain: - msvc - gcc steps: - name: Setup MSVC developer prompt uses: ilammy/msvc-dev-cmd@v1 if: ${{ matrix.toolchain == 'msvc' }} - name: Download zlib run: curl -L -O "https://zlib.net/fossils/zlib-${{ matrix.zlib-version }}.tar.gz" - name: Extract zlib …