summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2018-05-29 15:33:21 +0200
committerKonstantin Käfer <mail@kkaefer.com>2018-06-04 10:43:21 +0200
commit9ebb50416465e9c4c13df2f67b4f327020596c6e (patch)
tree76132d22f32677aa188351faecc2822cb24a8ec7
parent3ef67a827e6a322d943b793d962bcd9b76727e14 (diff)
downloadqtlocation-mapboxgl-9ebb50416465e9c4c13df2f67b4f327020596c6e.tar.gz
[node] hide all symbols from the Node.js addons
-rw-r--r--platform/linux/config.cmake4
-rw-r--r--platform/macos/config.cmake5
-rw-r--r--platform/node/symbol-list0
-rw-r--r--platform/node/version-script3
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: *;
+};