forked from bartvdbraak/blender
deps/windows/embree: Prevent exports leaking out of blender binary
embree marks a few of its functions with a dll_export macro forcibly exporting these symbols from whatever binary links them. Given we link embree statically and we do not want these exports in the blender binary, the macro needs to be a no-op.
This commit is contained in:
parent
9464260ed7
commit
4155f8dc21
@ -51,6 +51,7 @@ ExternalProject_Add(external_embree
|
||||
DOWNLOAD_DIR ${DOWNLOAD_DIR}
|
||||
URL_HASH MD5=${EMBREE_HASH}
|
||||
PREFIX ${BUILD_DIR}/embree
|
||||
PATCH_COMMAND ${PATCH_CMD} -p 1 -d ${BUILD_DIR}/embree/src/external_embree < ${PATCH_DIR}/embree.diff
|
||||
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${LIBDIR}/embree ${DEFAULT_CMAKE_FLAGS} ${EMBREE_EXTRA_ARGS}
|
||||
INSTALL_DIR ${LIBDIR}/embree
|
||||
)
|
||||
|
14
build_files/build_environment/patches/embree.diff
Normal file
14
build_files/build_environment/patches/embree.diff
Normal file
@ -0,0 +1,14 @@
|
||||
diff -Naur orig/common/sys/platform.h external_embree/common/sys/platform.h
|
||||
--- orig/common/sys/platform.h 2020-05-13 23:08:53 -0600
|
||||
+++ external_embree/common/sys/platform.h 2020-06-13 17:40:26 -0600
|
||||
@@ -84,8 +84,8 @@
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef __WIN32__
|
||||
-#define dll_export __declspec(dllexport)
|
||||
-#define dll_import __declspec(dllimport)
|
||||
+#define dll_export
|
||||
+#define dll_import
|
||||
#else
|
||||
#define dll_export __attribute__ ((visibility ("default")))
|
||||
#define dll_import
|
Loading…
Reference in New Issue
Block a user