diff options
-rw-r--r-- | platform/linux/config.cmake | 4 | ||||
-rw-r--r-- | platform/macos/config.cmake | 5 | ||||
-rw-r--r-- | platform/node/symbol-list | 0 | ||||
-rw-r--r-- | platform/node/version-script | 3 |
4 files changed, 10 insertions, 2 deletions
diff --git a/platform/linux/config.cmake b/platform/linux/config.cmake index d960a02d1c..f210250956 100644 --- a/platform/linux/config.cmake +++ b/platform/linux/config.cmake @@ -196,5 +196,7 @@ endmacro() macro(mbgl_platform_node) - # Enabling node module by defining this macro + target_link_libraries(mbgl-node INTERFACE + -Wl,--version-script=${CMAKE_SOURCE_DIR}/platform/node/version-script + ) endmacro() diff --git a/platform/macos/config.cmake b/platform/macos/config.cmake index aa3f17eea1..57475f0c7c 100644 --- a/platform/macos/config.cmake +++ b/platform/macos/config.cmake @@ -154,5 +154,8 @@ macro(mbgl_platform_benchmark) endmacro() macro(mbgl_platform_node) - # Define macro to enable this target on this platform + target_link_libraries(mbgl-node INTERFACE + -exported_symbols_list ${CMAKE_SOURCE_DIR}/platform/node/symbol-list + -dead_strip + ) endmacro() diff --git a/platform/node/symbol-list b/platform/node/symbol-list new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/platform/node/symbol-list diff --git a/platform/node/version-script b/platform/node/version-script new file mode 100644 index 0000000000..ab02f05633 --- /dev/null +++ b/platform/node/version-script @@ -0,0 +1,3 @@ +{ + local: *; +}; |