File tree 3 files changed +18
-7
lines changed
3 files changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,12 @@ namespace Corrade {
142
142
for more information when using custom buildsystems, see also
143
143
[mosra/corrade#51](https://github.com/mosra/corrade/issues/51).
144
144
- Fixed compilation with Clang and `-std=gnu++14` (see [mosra/corrade#62](https://github.com/mosra/corrade/pull/62)
145
+ - @ref CORRADE_VISIBILITY_STATIC no longer exports symbols in static
146
+ libraries to be consistent with hidden visibility by default, additionally
147
+ `-fvisibility-inlines-hidden` is passed along with `-fvisibility=hidden`
148
+ when @ref corrade-cmake "CORRADE_USE_PEDANTIC_FLAGS" property is enabled in
149
+ CMake on GCC and Clang to avoid linker warnings on macOS (see
150
+ [mosra/corrade#53](https://github.com/mosra/corrade/issues/53))
145
151
146
152
@subsection corrade-changelog-latest-bugfixes Bug fixes
147
153
Original file line number Diff line number Diff line change @@ -73,7 +73,13 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR (CMAKE_CXX_COMPILER_ID MATCHES "(Appl
73
73
"-Werror=return-type"
74
74
"-Wmissing-declarations"
75
75
"-pedantic"
76
- "-fvisibility=hidden" )
76
+ # Needs to have both, otherwise Clang's linker on macOS complains that
77
+ # "direct access in function [...] to global weak symbol [...] means the
78
+ # weak symbol cannot be overridden at runtime. This was likely caused
79
+ # by different translation units being compiled with different
80
+ # visibility settings." See also various google results for the above
81
+ # message.
82
+ "-fvisibility=hidden" "-fvisibility-inlines-hidden" )
77
83
78
84
# Some flags are not yet supported everywhere
79
85
# TODO: do this with check_c_compiler_flags()
Original file line number Diff line number Diff line change 50
50
#endif
51
51
52
52
/** @hideinitializer
53
- * @brief Public symbol in a static library
54
- */
55
- #ifdef CORRADE_TARGET_WINDOWS
53
+ @brief Public symbol in a static library
54
+
55
+ Defined as empty --- to be consistent with hidden visibility by default,
56
+ symbols in static libraries shouldn't be exported either.
57
+ */
56
58
#define CORRADE_VISIBILITY_STATIC
57
- #else
58
- #define CORRADE_VISIBILITY_STATIC __attribute__ ((visibility ("default")))
59
- #endif
60
59
61
60
/** @hideinitializer
62
61
@brief Local symbol
You can’t perform that action at this time.
0 commit comments