Skip to content

Commit b71038a

Browse files
authored
[AIX] Fix AIX BuildBot failure as AIX linker doesn't support version script. (#117342)
AIX BuildBot failed due to #116556 as AIX linker does not support version script. This PR is to fix the failure This PR is on behalf of [email protected]
1 parent 9c9e030 commit b71038a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

clang/tools/clang-shlib/CMakeLists.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,13 @@ add_clang_library(clang-cpp
4848
${_OBJECTS}
4949
LINK_LIBS
5050
${_DEPS})
51+
# AIX linker does not support version script
52+
if (NOT ${CMAKE_SYSTEM_NAME} MATCHES "AIX")
53+
configure_file(simple_version_script.map.in simple_version_script.map)
5154

52-
configure_file(simple_version_script.map.in simple_version_script.map)
53-
54-
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
55-
target_link_options(clang-cpp PRIVATE LINKER:--version-script,${CMAKE_CURRENT_BINARY_DIR}/simple_version_script.map)
55+
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
56+
target_link_options(clang-cpp PRIVATE LINKER:--version-script,${CMAKE_CURRENT_BINARY_DIR}/simple_version_script.map)
57+
endif()
5658
endif()
5759

5860
# Optimize function calls for default visibility definitions to avoid PLT and

0 commit comments

Comments
 (0)