Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions clang/tools/clang-shlib/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,13 @@ add_clang_library(clang-cpp
${_OBJECTS}
LINK_LIBS
${_DEPS})
# AIX linker does not support version script
if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "AIX")
configure_file(simple_version_script.map.in simple_version_script.map)

configure_file(simple_version_script.map.in simple_version_script.map)

if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This implies NOT ${CMAKE_SYSTEM_NAME} MATCHES "AIX", hence the target_link_options is already unreachable.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, @aaronpuchert! With commit eaa0a21 the AIX build problem is fixed already so the change in #117342 does not make sense any more. I created PR Revert "[AIX] Fix AIX BuildBot failure as AIX linker doesn't support version script.".

target_link_options(clang-cpp PRIVATE LINKER:--version-script,${CMAKE_CURRENT_BINARY_DIR}/simple_version_script.map)
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
target_link_options(clang-cpp PRIVATE LINKER:--version-script,${CMAKE_CURRENT_BINARY_DIR}/simple_version_script.map)
endif()
endif()

# Optimize function calls for default visibility definitions to avoid PLT and
Expand Down
Loading