[libomp][AIX] Ensure only libomp.a is published on AIX (#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.
This commit is contained in:
parent
9ddb1cd564
commit
bde51d9b0d
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user