fix: LD_BUILD_SHARED_LIBS build flag usage #260
Merged
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.
In my previous PR cleaning up cmake variables, during development I renamed the
BUILD_SHARED_LIBS
flag toBUILD_STATIC_LIBS
, but then reconsidered and stuck with the original naming.Unfortunately I didn't un-rename some usages of it - so we ended up having some instances of
LD_BUILD_STATIC_LIBS
in ourCMakeLists.txt
.It appears this didn't have an obvious impact on our build/release process because:
NOT LD_BUILD_STATIC_LIBS
would always be true (variable not defined), then it would have been setting-fvisibility=hidden
on both shared and static builds. I'm pretty sure that flag has no affect when building static libs so it was a no-op in that situation.target_sources
trick for pulling in the boost libraries always works whether we're building static libs or dynamic libs, so another no-op.It'd be nice to test this going forward. Some ideas:
nm -gU artifact.dylib | wc -l
to get the number of symbols (e.g. 8k when visibility=hidden, 26k without)Manual workflow run: