1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
|
From 8a1e766897d2e5e8628640e92db2cd63fd04fdf6 Mon Sep 17 00:00:00 2001
From: Daniel Pocock <daniel@pocock.pro>
Date: Thu, 24 Sep 2015 07:59:29 +0200
Subject: [PATCH] C++ symbols map
https://github.com/googlei18n/libphonenumber/pull/831
cpp/CMakeLists.txt | 6 ++++++
cpp/symbols.map | 15 +++++++++++++++
2 files changed, 21 insertions(+)
create mode 100644 cpp/symbols.map
@@ -282,6 +282,8 @@ set (
"src/phonenumbers/utf/unilib.cc"
)
+set(symbol_map "${CMAKE_SOURCE_DIR}/symbols.map")
+
if (BUILD_GEOCODER)
set (
GEOCODING_SOURCES
@@ -486,6 +488,8 @@ if (BUILD_SHARED_LIBS)
PREFIX "lib"
SOVERSION ${libphonenumber_VERSION_MAJOR}
VERSION ${libphonenumber_VERSION_MAJOR}.${libphonenumber_VERSION_MINOR})
+ set_target_properties(phonenumber-shared PROPERTIES LINK_FLAGS "${ldflags} -Wl,--version-script,${symbol_map}")
+ set_target_properties(phonenumber-shared PROPERTIES LINK_DEPENDS ${symbol_map})
if (USE_ICU_REGEXP AND USE_ALTERNATE_FORMATS)
add_dependencies (phonenumber-shared ${ALT_FORMAT_METADATA_TARGET})
@@ -504,6 +508,8 @@ if (BUILD_SHARED_LIBS)
PREFIX "lib"
SOVERSION ${libphonenumber_VERSION_MAJOR}
VERSION ${libphonenumber_VERSION_MAJOR}.${libphonenumber_VERSION_MINOR})
+ set_target_properties(geocoding-shared PROPERTIES LINK_FLAGS "${ldflags} -Wl,--version-script,${symbol_map}")
+ set_target_properties(geocoding-shared PROPERTIES LINK_DEPENDS ${symbol_map})
endif ()
endif ()
@@ -0,0 +1,15 @@
+{
+global:
+ extern "C++" {
+ i18n::phonenumbers::*;
+ typeinfo?for?i18n::phonenumbers::*;
+ typeinfo?name?for?i18n::phonenumbers::*;
+ VTT?for?i18n::phonenumbers::*;
+ virtual?thunk?to?i18n::phonenumbers::*;
+ vtable?for?i18n::phonenumbers::*;
+ };
+local:
+ extern "C++" {
+ *;
+ };
+};
|