-
-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't export symbols from static library #221
base: master
Are you sure you want to change the base?
Conversation
LGTM |
The meson change LGTM, I don't think we can do anything better with meson...
Most likely on Linux it is linked with |
(Style) Can you change the commit title to e.g. As for the config.h change, @kasper93 it's saying it's not needed? Seems like it wouldn't really fix anything, if you're saying it is still broken in the "both" case. |
meson should never set PL_EXPORT and PL_STATIC at the same time, so the config.h.in change just re-orders the defines but with no change in actual functionality. |
@kasper93 I don't think both would ever be workable on windows because you need different installed headers for the static vs non-static library (due to the need for dllimport, or rely on the client using the library to set some define before including the header…) The both case is mostly for a nice benefit of not rebuilding everything, which makes it somewhat pointless once you have different preprocessor macros for static vs dynamic cases as then you anyway need to rebuild everything… |
You need exactly the same headers. That's why |
We never merged that? Either way, meson now have |
@BtbN: Does this work for you? https://code.videolan.org/videolan/libplacebo/-/merge_requests/682 |
Looks good and should allow the workaround on my side to be removed. |
The "both" case is likely still broken, but I see no good way to fix that with meson.
Background:
FFmpeg just started linking to libplacebo directly from ffplay.
This broke linking on Windows, since libavfilter ended up exporting the libplacebo symbols due to the forced dllexport on them.
Arguably, on Linux the visibility should likely also be set to hidden if PL_STATIC is set, since there is no point in exporting the symbols there either. But apparently the linker there is a bit smarter and figures things out.