Skip to content

Conversation

@akoeplinger
Copy link
Member

See comment at the start of the file, add_compile_options() and add_linker_flag() will leak to the cmake projects which include zlib-ng.cmake.

See comment at the start of the file, add_compile_options() and add_linker_flag() will leak to the cmake projects which include zlib-ng.cmake.
@github-actions github-actions bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Sep 9, 2025
@akoeplinger akoeplinger added area-Build-mono and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Sep 9, 2025
@akoeplinger akoeplinger marked this pull request as ready for review September 9, 2025 10:35
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a CMake configuration issue in the zlib-ng integration where pthread flags were incorrectly being applied globally instead of only to the zlib target. The change prevents pthread compilation and linking flags from leaking to other projects that include the zlib-ng.cmake file.

Key changes:

  • Replace global add_compile_options(-pthread) and add_linker_flag(-pthread) with target-specific alternatives
  • Ensure pthread flags only apply to the zlib target when building for browser/WASI platforms

@akoeplinger akoeplinger merged commit 5d90b16 into dotnet:main Sep 10, 2025
152 checks passed
@akoeplinger akoeplinger deleted the fix-leaking-pthread branch September 10, 2025 10:52
@github-actions github-actions bot locked and limited conversation to collaborators Oct 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants