diff options
Diffstat (limited to 'Modules/Platform/AIX-GNU.cmake')
-rw-r--r-- | Modules/Platform/AIX-GNU.cmake | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Modules/Platform/AIX-GNU.cmake b/Modules/Platform/AIX-GNU.cmake index c3b7922..beb928b 100644 --- a/Modules/Platform/AIX-GNU.cmake +++ b/Modules/Platform/AIX-GNU.cmake @@ -25,4 +25,11 @@ macro(__aix_compiler_gnu lang) if(CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 7 OR CMAKE_SYSTEM_VERSION VERSION_LESS 7.1) unset(CMAKE_${lang}_COMPILE_OPTIONS_VISIBILITY) endif() + + # 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 <OBJECT_DIR>/objects.exp <OBJECTS>" + "<CMAKE_${lang}_COMPILER> <CMAKE_SHARED_LIBRARY_${lang}_FLAGS> -Wl,-bE:<OBJECT_DIR>/objects.exp <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS> <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>" + ) endmacro() |