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.
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.
This won't work as it only sets the default visibility (
-fvisibility=hidden
), source files can still override it with__attribute__(visibility("default"))
(which theBLOCK_EXPORT
macro defines).In fact this is already set on line 20: 1eee0f9#diff-af3b638bc2a3e6c650974192a53c7291R20
Since your ultimate goal is one BlocksRuntime per program, have you considered removing
STATIC
from theadd_library(BlocksRuntime)
command above? I think that would result in a BlocksRuntime that respectsBUILD_SHARED_LIBS
. You should also make sure to install it, e.g.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.
Yeah, there is already a PR for that (and this was meant as a stop gap until we get that merged. Since we discussed that we are going to actively pursue that first, this is no longer relevant.