Repository navigation
build(libobs): lib-modules are static archives linked whole into libobs (#3261) - #3318
Merged
Merged
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.
What
libobs/cmake/modules.cmake:libobs-mod-<module>is now a STATIC archive, not an OBJECT library: the unit the module cache (build(libobs): content-addressed module artifact cache #3262) will key, store and restore.$<LINK_LIBRARY:WHOLE_ARCHIVE,...>(--whole-archive,-force_load,/WHOLEARCHIVE). A plain archive link would drop objects that nothing references by name: registrations and callback-only code.libobs-core-modulesandlibobs-versionthemselves. So a module now takes only an OBJECT library's compile requirements, the same handling build(libobs): split libobs-objects into per-module OBJECT libraries #3259 gave the interface-sourcedOBS::obfuscate.Verification (Linux,
obs-rust-linux-validateimage, RelWithDebInfo hybrid, master vs branch)nm -D --defined-only libobs.sois identical, 1,767 symbols.nm --defined-only libobs.sois identical, 8,273 symbols. So the archive link dropped no object.Windows and macOS: PR CI's Tier 2 lanes link libobs through this path.
RED → GREEN
ci/test_libobs_modules.pyArchiveTestfails on master, where modules are OBJECT libraries with no whole-archive link and no object-library guard.test_build_groups.py,test_shared_build_files.pyand./lint.Test cost: one more Python test, under 1 ms.
Fixes #3261. Refs #3256.