Add macOS static C API archive#477
Draft
parallaxisjones wants to merge 1 commit into
Draft
Conversation
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
zvec_c_api_statictarget that builds a fatlibzvec_c_api.afrom the C API object plus the zvec and bundled third-party static archives.makebuilds use the same toolchain as the parent CMake build.Why
Downstream Rust consumers already support
ZVEC_STATIC=1, but current zvec release artifacts do not providelibzvec_c_api.a. That means projects that want a single statically linked executable cannot use zvec without packaging a dynamiclibzvec_c_apinext to the binary.This change provides a first static C API artifact for macOS by mirroring the dependency closure that is already force-loaded into
libzvec_c_api.dylib.Validation
zvec_c_apishared target successfully.zvec_c_api_statictarget successfully, producinglib/libzvec_c_api.a.zvec_collection_create_and_open.libzvec_c_api.aplus macOS system libraries; it printed0.2.1.libzvec_c_api.dylibviaotool -L.Lz4.BUILDwithout an outerSDKROOT, validating the LZ4 compiler/SDK propagation.Notes
This PR intentionally starts with macOS because
/usr/bin/libtool -staticprovides a straightforward way to merge static archives into a single archive. Linux can follow with anar/MRI or object-extraction implementation.