https://github.com/llvmbot created 
https://github.com/llvm/llvm-project/pull/156504

Backport 94738ddaf42a0fa1981dc083f9ed94ba11943458

Requested by: @amy-kwan

>From 58a31b4aa15cfa88cade7a0ebe66a14396a7e007 Mon Sep 17 00:00:00 2001
From: David Tenty <dalte...@ibm.com>
Date: Thu, 28 Aug 2025 09:29:27 -0400
Subject: [PATCH] [CMake][AIX] Enable CMP0182: Create shared library archives
 by default (#155686)

On AIX we prefer to create shared libraries as shared library archives
(i.e. we archive the shared object in a big AR archive) as this is the
standard format on the platform.

There is now a CMake policy that allows us to do this by default, so
opt-in to that behaviour.

---------

Co-authored-by: Hubert Tong <hubert.reinterpretc...@gmail.com>
(cherry picked from commit 94738ddaf42a0fa1981dc083f9ed94ba11943458)
---
 cmake/Modules/CMakePolicy.cmake | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/cmake/Modules/CMakePolicy.cmake b/cmake/Modules/CMakePolicy.cmake
index 421f5a4dda6c6..cf986331707b6 100644
--- a/cmake/Modules/CMakePolicy.cmake
+++ b/cmake/Modules/CMakePolicy.cmake
@@ -41,3 +41,9 @@ if(POLICY CMP0156)
     cmake_policy(SET CMP0179 NEW)
   endif()
 endif()
+
+# CMP0182: Create shared library archives by default on AIX.
+# New in CMake 4.0: https://cmake.org/cmake/help/latest/policy/CMP0182.html
+if(POLICY CMP0182)
+  cmake_policy(SET CMP0182 NEW)
+endif()

_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to