From afcd9fe66943259ea9521ff77b32673e0cdf70b2 Mon Sep 17 00:00:00 2001 From: Brad King Date: Thu, 30 Jan 2020 09:10:58 -0500 Subject: AIX: Add an option to disable automatic exports from shared libraries Since commit 0f150b69d3 (AIX: Explicitly compute shared object exports for both XL and GNU, 2019-07-11, v3.16.0-rc1~418^2~2) we always export all symbols from shared libraries by default. Add a new target property called `AIX_EXPORT_ALL_SYMBOLS` that can be explicitly set to OFF to suppress this behavior and export no symbols by default. Fixes: #20290 --- Modules/Platform/AIX-GNU.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Modules/Platform/AIX-GNU.cmake') diff --git a/Modules/Platform/AIX-GNU.cmake b/Modules/Platform/AIX-GNU.cmake index 42e5e364e3..5a532c7ccb 100644 --- a/Modules/Platform/AIX-GNU.cmake +++ b/Modules/Platform/AIX-GNU.cmake @@ -23,11 +23,11 @@ macro(__aix_compiler_gnu lang) # Construct the export list ourselves to pass only the object files so # that we export only the symbols actually provided by the sources. set(CMAKE_${lang}_CREATE_SHARED_LIBRARY - "\"${CMAKE_ROOT}/Modules/Platform/AIX/ExportImportList\" -o /exports.exp " + "\"${CMAKE_ROOT}/Modules/Platform/AIX/ExportImportList\" -o /exports.exp " " -Wl,-bE:/exports.exp -o " ) set(CMAKE_${lang}_LINK_EXECUTABLE_WITH_EXPORTS - "\"${CMAKE_ROOT}/Modules/Platform/AIX/ExportImportList\" -o -l . " + "\"${CMAKE_ROOT}/Modules/Platform/AIX/ExportImportList\" -o -l . " " -Wl,-bE: -o ") endmacro() -- cgit v1.2.1