diff --git a/src/build-scripts/hidesymbols.map b/src/build-scripts/hidesymbols.map index 3f40d53b6..d9be16499 100644 --- a/src/build-scripts/hidesymbols.map +++ b/src/build-scripts/hidesymbols.map @@ -1,4 +1,4 @@ { - global: *OSL*; test_shade; *osl*imageio*; *osl_input_extensions; PyInit*; + global: *OSL*; *osl*imageio*; *osl_input_extensions; PyInit*; local: osl_*; *pvt*; *; }; diff --git a/src/testshade/CMakeLists.txt b/src/testshade/CMakeLists.txt index 470c1fc78..12e1745a1 100644 --- a/src/testshade/CMakeLists.txt +++ b/src/testshade/CMakeLists.txt @@ -110,6 +110,13 @@ if (NOT CODECOV) OUTPUT_NAME libtestshade${OSL_LIBNAME_SUFFIX} ) + # Only libtestshade exports test_shade; keep it out of the global map. + if (VISIBILITY_MAP_COMMAND) + set_property (TARGET libtestshade + APPEND PROPERTY LINK_FLAGS + -Wl,--version-script=${CMAKE_CURRENT_SOURCE_DIR}/testshade_symbols.map) + endif () + target_link_libraries (libtestshade PRIVATE oslexec oslquery oslcomp) diff --git a/src/testshade/testshade_symbols.map b/src/testshade/testshade_symbols.map new file mode 100644 index 000000000..65589759a --- /dev/null +++ b/src/testshade/testshade_symbols.map @@ -0,0 +1,4 @@ +{ + global: test_shade; + local: *; +};