From dd8db8105c021637c7d7c7504c83c3c57c03f130 Mon Sep 17 00:00:00 2001 From: Cosmin Truta Date: Sat, 10 Sep 2022 23:50:49 +0300 Subject: [PATCH] cmake: Fix the shared build on Android The ld version script should not be generated on Android. Co-authored-by: Volker Krause Co-authored-by: Cosmin Truta Signed-off-by: Cosmin Truta --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 527d83693..1f2fcd52a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -223,9 +223,10 @@ set(CMAKE_DEBUG_POSTFIX "d") include(CheckCSourceCompiles) option(ld-version-script "Enable linker version script" ON) -if(ld-version-script AND NOT APPLE) +if(ld-version-script AND NOT ANDROID AND NOT APPLE) # Check if LD supports linker scripts. - file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map" "VERS_1 { + file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/conftest.map" " +VERS_1 { global: sym; local: *; };