[Openmp-commits] [openmp] [libomp][AIX] Ensure only libomp.a is published on AIX (PR #109016)
Xing Xue via Openmp-commits
openmp-commits at lists.llvm.org
Tue Sep 17 10:14:41 PDT 2024
https://github.com/xingxue-ibm created https://github.com/llvm/llvm-project/pull/109016
For `libomp` on AIX, we build shared object `libomp.so` first and then archive it into `libomp.a`. Due to a CMake for AIX problem, the install step also tries to publish `libomp.so`. While we use a script to build `libomp.a` out-of-tree for Clang and avoided the problem, this chokes the in-tree build for Flang. The issue will be reported to CMake but before a fixed CMake is available, this patch ensures only `libomp.a` is published.
>From ad8d78a7d2299849de798f905b68cb4fe0737658 Mon Sep 17 00:00:00 2001
From: Xing Xue <xingxue at outlook.com>
Date: Tue, 17 Sep 2024 12:14:59 -0400
Subject: [PATCH] Ensure only libomp.a is published on AIX.
---
openmp/runtime/src/CMakeLists.txt | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/openmp/runtime/src/CMakeLists.txt b/openmp/runtime/src/CMakeLists.txt
index f106694841ce8d..2dd54b5116d920 100644
--- a/openmp/runtime/src/CMakeLists.txt
+++ b/openmp/runtime/src/CMakeLists.txt
@@ -426,7 +426,11 @@ if(WIN32)
endforeach()
else()
- install(TARGETS omp ${export_to_llvmexports} ${LIBOMP_INSTALL_KIND} DESTINATION "${OPENMP_INSTALL_LIBDIR}")
+ if(${CMAKE_SYSTEM_NAME} MATCHES "AIX")
+ install(FILES ${LIBOMP_LIBRARY_DIR}/libomp.a DESTINATION "${OPENMP_INSTALL_LIBDIR}" COMPONENT runtime)
+ else()
+ install(TARGETS omp ${export_to_llvmexports} ${LIBOMP_INSTALL_KIND} DESTINATION "${OPENMP_INSTALL_LIBDIR}")
+ endif()
if(${LIBOMP_INSTALL_ALIASES})
# Create aliases (symlinks) of the library for backwards compatibility
More information about the Openmp-commits
mailing list