-
-
Notifications
You must be signed in to change notification settings - Fork 324
ci/cd: add WASM-specific thread configuration to CMake #1464
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Abseil has been removed from the dependency list in vcpkg.json and related CMake configuration. Patch handling for abseil and protobuf portfiles is now conditional on the target platform, improving compatibility with Emscripten. References to absl::log_internal_check_op have been removed from build targets.
2269dee to
6091071
Compare
Tests are no longer built when targeting WASM, and the gtest dependency is excluded from WASM builds in vcpkg.json. This streamlines the build process for WASM platforms where tests are not supported.
72842a0 to
6595509
Compare
Relocated the WASM detection logic from src/CMakeLists.txt to the main CMakeLists.txt to centralize configuration and avoid redundancy.
Updated CMakeLists.txt and vcpkg.json to include Abseil (absl) as a required dependency for the project.
Corrected indentation for PATCHES in abseil and protobuf portfiles to improve CMake formatting. Added abseil::log_internal_check_op to target link libraries in CMakeLists.txt for all platforms. Updated vcpkg.json to move abseil dependency up in the list for consistency.
Reorganizes CMakeLists.txt to improve handling of threading and package finding for WASM builds. Moves some package find commands outside WASM conditional and ensures Threads are only found when not targeting WASM. Also updates protobuf CMake logic to avoid unnecessary thread flags for WASM.
Eliminated Threads::Threads from the WASM build target in CMakeLists.txt, as threading is not supported or required in this configuration.
Introduces a new 'wasm-debug' configure and build preset in CMakePresets.json for building with Emscripten. Updates vcpkg.json to exclude OpenSSL on wasm32 platforms, improving compatibility for WebAssembly builds.
|



This pull request refactors the build configuration to improve platform compatibility and simplify dependency management for threading support. The main changes focus on how patches are applied for
abseilandprotobuf, and how threading is handled, especially for WASM builds. Additionally, references to theabseillibrary and its usage have been removed from the build system.Build and Dependency Management Improvements:
browser/overlay-ports/abseil/portfile.cmakeandbrowser/overlay-ports/protobuf/portfile.cmaketo conditionally include theuse_pthread.patchonly when not targeting Emscripten, improving cross-platform compatibility and reducing unnecessary patching. [1] [2]abseilfrom the dependency list invcpkg.json, simplifying the project's dependency graph.Threading Support Enhancements:
src/CMakeLists.txtto add special handling for threads when building for WASM: sets pthread preferences, attempts to find the Threads package, and if not found, creates an imported interface target with pthread flags. This ensures robust threading support across platforms, especially for WASM.Cleanup of Abseil Usage:
absl::log_internal_check_opfrom link targets in all platform-specific sections ofsrc/CMakeLists.txt, fully eliminating abseil linkage from the build. [1] [2] [3] [4]