Add granular CMake targets with BUILD_SHARED_LIBS support#166
Open
afrind wants to merge 1 commit intofacebookincubator:mainfrom
Open
Add granular CMake targets with BUILD_SHARED_LIBS support#166afrind wants to merge 1 commit intofacebookincubator:mainfrom
afrind wants to merge 1 commit intofacebookincubator:mainfrom
Conversation
…cubator#166) Summary: This adds granular CMake targets to fizz, similar to folly's granular targets. Each fizz library (e.g., fizz_crypto_hkdf, fizz_protocol_certificate) can now be linked individually, reducing binary sizes for applications that only need specific functionality. Key changes: - Added FizzFunctions.cmake with fizz_add_library() function that: - Creates OBJECT libraries (compiled once, used for both granular and monolithic) - Creates STATIC libraries for individual linking (static builds) - Creates INTERFACE libraries linking to monolithic fizz (shared builds) - Handles deferred dependency resolution for internal fizz deps - Links Folly::folly and optional deps (OQS, aegis) in shared builds - Added granular CMakeLists.txt for each subdirectory, generated from BUCK files using generate_cmake.py. Manually maintained for: - backend/ (conditional libaegis/liboqs logic) - compression/ (conditional brotli logic) - Added generate_cmake.py to auto-generate CMakeLists.txt from BUCK files - Added lint_cmake_sync.py for arc lint integration Build behavior: - BUILD_SHARED_LIBS=OFF: Creates individual .a files + monolithic libfizz.a - BUILD_SHARED_LIBS=ON: Creates INTERFACE targets linking to libfizz.so Differential Revision: D91009035
847d9d4 to
5d2543c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
This adds granular CMake targets to fizz, similar to folly's granular targets.
Each fizz library (e.g., fizz_crypto_hkdf, fizz_protocol_certificate) can now
be linked individually, reducing binary sizes for applications that only need
specific functionality.
Key changes:
Added FizzFunctions.cmake with fizz_add_library() function that:
Added granular CMakeLists.txt for each subdirectory, generated from BUCK
files using generate_cmake.py. Manually maintained for:
Added generate_cmake.py to auto-generate CMakeLists.txt from BUCK files
Added lint_cmake_sync.py for arc lint integration
Build behavior:
Differential Revision: D91009035