diff options
author | Brecht Van Lommel <brecht> | 2022-07-29 18:31:52 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-07-29 18:54:32 +0300 |
commit | cfd16c04f8316270b67c73775a5885d6bc4dc4e2 (patch) | |
tree | f58df47ddd3a94cf064db15a41656d21c044811b /build_files/cmake | |
parent | 1665e40e16fdf8cc914d6eea3577834ce9597ca4 (diff) |
Build: hide all symbols except a few required ones on Linux
Instead of specifying which symbols to hide, we hide all and make a few
visible. Some users may be relying on calling internal Blender functions,
but Windows is already hiding all of them and this is just not supported.
Fixes T99900: crash with some third-party Python libraries since OneAPI
Ref T76442
Differential Revision: https://developer.blender.org/D14971
Diffstat (limited to 'build_files/cmake')
-rw-r--r-- | build_files/cmake/platform/platform_apple.cmake | 3 | ||||
-rw-r--r-- | build_files/cmake/platform/platform_unix.cmake | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake index 3c77a28d55f..f84be3c5238 100644 --- a/build_files/cmake/platform/platform_apple.cmake +++ b/build_files/cmake/platform/platform_apple.cmake @@ -470,8 +470,9 @@ string(APPEND CMAKE_CXX_FLAGS " -ftemplate-depth=1024") # Avoid conflicts with Luxrender, and other plug-ins that may use the same # libraries as Blender with a different version or build options. +set(PLATFORM_SYMBOLS_MAP ${CMAKE_SOURCE_DIR}/source/creator/symbols_apple.map) string(APPEND PLATFORM_LINKFLAGS - " -Wl,-unexported_symbols_list,'${CMAKE_SOURCE_DIR}/source/creator/osx_locals.map'" + " -Wl,-unexported_symbols_list,'${PLATFORM_SYMBOLS_MAP}'" ) string(APPEND CMAKE_CXX_FLAGS " -stdlib=libc++") diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake index d22cf437e59..f6e233a0c86 100644 --- a/build_files/cmake/platform/platform_unix.cmake +++ b/build_files/cmake/platform/platform_unix.cmake @@ -888,8 +888,9 @@ unset(_IS_LINKER_DEFAULT) # Avoid conflicts with Mesa llvmpipe, Luxrender, and other plug-ins that may # use the same libraries as Blender with a different version or build options. +set(PLATFORM_SYMBOLS_MAP ${CMAKE_SOURCE_DIR}/source/creator/symbols_unix.map) set(PLATFORM_LINKFLAGS - "${PLATFORM_LINKFLAGS} -Wl,--version-script='${CMAKE_SOURCE_DIR}/source/creator/blender.map'" + "${PLATFORM_LINKFLAGS} -Wl,--version-script='${PLATFORM_SYMBOLS_MAP}'" ) # Don't use position independent executable for portable install since file |