-
-
Notifications
You must be signed in to change notification settings - Fork 573
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
Add visibility-hidden to CMake build #1563
Conversation
This should make all symbols that are not marked otherwise have hidden visibility. There still may be exposed symbols if marked with respective attributes.
This is to avoid symbol clashes when multiple versions of godot-cpp are loaded through different plugins. |
Thanks! With scons, visibility hidden is the default, but there is an option to change it. Would it be possible to add an option for cmake as well? |
You can change the behavior later - even in downstream projects via set_target_properties(<targets...> PROPERTIES CXX_VISIBILITY_PRESET default ) |
I think this should be merged. Even though we're aiming for feature and interface parity, even without the option displayed it still adds something missing from the cmake build that is in the scons one. Perfect is the enemy of the good and all. it's trivial to add a cache entry which will show up in 'cmake -LH' |
Ok, let's merge this and then add an option in a follow-up |
Cherry-picked for 4.2 in PR #1631 |
Cherry-picked for 4.3 in PR #1632 |
This should make all symbols that are not marked otherwise have hidden visibility. There still may be exposed symbols if marked with respective attributes.