summaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2018-05-29 12:28:14 +0200
committerKonstantin Käfer <mail@kkaefer.com>2018-06-04 10:43:21 +0200
commit0b305aca7de0c95e54bdfe26c342e4dce77f10bb (patch)
tree5fa16b39cb463a70a22d971ebd00647c2931c174 /platform
parentbe66de6fcda643872311b21ba8fd5abc8302fc3e (diff)
downloadqtlocation-mapboxgl-0b305aca7de0c95e54bdfe26c342e4dce77f10bb.tar.gz
[linux] statically link the C++ standard library
Most of the STL is header-only anyway, and statically linking it only has a small overhead. On the other hand, it allows us to build more portable executables.
Diffstat (limited to 'platform')
-rw-r--r--platform/linux/config.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/platform/linux/config.cmake b/platform/linux/config.cmake
index 53683daef0..57411f916d 100644
--- a/platform/linux/config.cmake
+++ b/platform/linux/config.cmake
@@ -99,6 +99,14 @@ macro(mbgl_platform_core)
target_link_libraries(mbgl-core
PUBLIC -lz
)
+
+ if(WITH_CXX11ABI)
+ # Statically link libstdc++ when we're using the new STL ABI
+ target_link_libraries(mbgl-core
+ PUBLIC -static-libstdc++
+ PUBLIC -Wl,-Bsymbolic-functions
+ )
+ endif()
endmacro()