diff options
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | platform/linux/config.cmake | 8 |
2 files changed, 9 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c2f7134de7..7306179c25 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.4) project(mbgl LANGUAGES CXX C) set(CMAKE_CXX_STANDARD 14) -option(WITH_CXX11ABI "Use cxx11abi mason packages" OFF) +option(WITH_CXX11ABI "Use the C++11 ABI" OFF) option(WITH_COVERAGE "Enable coverage reports" OFF) option(WITH_OSMESA "Use OSMesa headless backend" OFF) option(WITH_EGL "Use EGL backend" OFF) 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() |