mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-01 11:22:21 -06:00
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
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user