[clang] Revert "[AIX] Fix AIX BuildBot failure as AIX linker doesn't support version script." (PR #117444)

Xing Xue via cfe-commits cfe-commits at lists.llvm.org
Sat Nov 23 09:17:08 PST 2024


https://github.com/xingxue-ibm created https://github.com/llvm/llvm-project/pull/117444

Commit https://github.com/llvm/llvm-project/commit/eaa0a21d21962280dc2c03a09152510f6162a576 has fixed the build problem already so the change in llvm/llvm-project#117342 does not make sense any more. I am reverting it. 

>From d0e6539d49cdeeb617b75dcceacf6287a0a8178e Mon Sep 17 00:00:00 2001
From: Xing Xue <xingxue at outlook.com>
Date: Sat, 23 Nov 2024 12:09:28 -0500
Subject: [PATCH] =?UTF-8?q?Revert=20"[AIX]=20Fix=20AIX=20BuildBot=20failur?=
 =?UTF-8?q?e=20as=20AIX=20linker=20doesn't=20support=20version=20=E2=80=A6?=
 =?UTF-8?q?"?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This reverts commit b71038a69ee95f5dd740f99a1cb7aefde0859562.
---
 clang/tools/clang-shlib/CMakeLists.txt | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/clang/tools/clang-shlib/CMakeLists.txt b/clang/tools/clang-shlib/CMakeLists.txt
index 2d97347ea7f828..31484ec49c7739 100644
--- a/clang/tools/clang-shlib/CMakeLists.txt
+++ b/clang/tools/clang-shlib/CMakeLists.txt
@@ -48,13 +48,11 @@ 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)
 
-  if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
-    target_link_options(clang-cpp PRIVATE LINKER:--version-script,${CMAKE_CURRENT_BINARY_DIR}/simple_version_script.map)
-  endif()
+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)
 endif()
 
 # Optimize function calls for default visibility definitions to avoid PLT and



More information about the cfe-commits mailing list