[clang] [AIX] Fix AIX BuildBot failure as AIX linker doesn't support version script. (PR #117342)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Nov 22 08:18:07 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Daniel Chen (DanielCChen)
<details>
<summary>Changes</summary>
AIX BuildBot failed due to https://github.com/llvm/llvm-project/pull/116556 as AIX linker does not support version script.
This PR is to fix the failure
This PR is on behalf of gnikolov@<!-- -->ca.ibm.com
---
Full diff: https://github.com/llvm/llvm-project/pull/117342.diff
1 Files Affected:
- (modified) clang/tools/clang-shlib/CMakeLists.txt (+6-4)
``````````diff
diff --git a/clang/tools/clang-shlib/CMakeLists.txt b/clang/tools/clang-shlib/CMakeLists.txt
index 31484ec49c7739..2d97347ea7f828 100644
--- a/clang/tools/clang-shlib/CMakeLists.txt
+++ b/clang/tools/clang-shlib/CMakeLists.txt
@@ -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")
- 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
``````````
</details>
https://github.com/llvm/llvm-project/pull/117342
More information about the cfe-commits
mailing list