summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorRob Boehne <robb@datalogics.com>2019-01-03 22:42:23 (GMT)
committerBrad King <brad.king@kitware.com>2019-01-10 19:25:06 (GMT)
commit74720a298cec05af29f18315990f64ddfda344f6 (patch)
tree749dc672186b65bec9d0a1b310ab7b940631ce08 /Modules
parent6092a770f66bff959749170141d44188f4b6f3f1 (diff)
downloadCMake-74720a298cec05af29f18315990f64ddfda344f6.zip
CMake-74720a298cec05af29f18315990f64ddfda344f6.tar.gz
CMake-74720a298cec05af29f18315990f64ddfda344f6.tar.bz2
XL: Move '-bE' flag earlier so it can be overridden
By default, we generate an export list for a shared library and pass that file on the link line. The problem was that it could not be overridden by a target when a specific export file is being used. Multiple `-bE` flags on the link are overridden by subsequent `-bE` flags, so only the last one is used. Fixes: #13282
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Compiler/XL.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/Compiler/XL.cmake b/Modules/Compiler/XL.cmake
index 21fe5e8..68dc28a 100644
--- a/Modules/Compiler/XL.cmake
+++ b/Modules/Compiler/XL.cmake
@@ -48,7 +48,7 @@ macro(__compiler_xl lang)
# files so that we export only the symbols actually provided by the sources.
set(CMAKE_${lang}_CREATE_SHARED_LIBRARY
"${CMAKE_XL_CreateExportList} <OBJECT_DIR>/objects.exp <OBJECTS>"
- "<CMAKE_${lang}_COMPILER> <CMAKE_SHARED_LIBRARY_${lang}_FLAGS> <LANGUAGE_COMPILE_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_${lang}_FLAGS> -Wl,-bE:<OBJECT_DIR>/objects.exp <SONAME_FLAG><TARGET_SONAME> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>"
+ "<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>"
)
endif()
endmacro()