[PATCH] D96282: [CMake][AIX] Adjust plugin library externsion used on AIX

Xiangling Liao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 18 10:40:39 PST 2021


Xiangling_L added inline comments.


================
Comment at: llvm/cmake/modules/HandleLLVMOptions.cmake:157-159
+  set(LLVM_PLUGIN_EXT ".so")
+else()
+  set(LLVM_PLUGIN_EXT ${CMAKE_SHARED_LIBRARY_SUFFIX})
----------------
stevewan wrote:
> My experiment (i.e., `cmake --system-information`) with cmake3.15.7 on an AIX7.2 machine shown that `CMAKE_SHARED_LIBRARY_SUFFIX` expanded to `.so`, am I missing part of the story?
> 
> Also, is `CMAKE_SHARED_MODULE_SUFFIX` a viable option here?
> 
Yes, before cmake 3.16.0, they use `.so` as shared library suffix due to consistency with other platforms.


================
Comment at: llvm/cmake/modules/HandleLLVMOptions.cmake:157-159
+  set(LLVM_PLUGIN_EXT ".so")
+else()
+  set(LLVM_PLUGIN_EXT ${CMAKE_SHARED_LIBRARY_SUFFIX})
----------------
Xiangling_L wrote:
> stevewan wrote:
> > My experiment (i.e., `cmake --system-information`) with cmake3.15.7 on an AIX7.2 machine shown that `CMAKE_SHARED_LIBRARY_SUFFIX` expanded to `.so`, am I missing part of the story?
> > 
> > Also, is `CMAKE_SHARED_MODULE_SUFFIX` a viable option here?
> > 
> Yes, before cmake 3.16.0, they use `.so` as shared library suffix due to consistency with other platforms.
Yes, before 3.16.0 cmake implements shared library as `.so` on AIX due to consistency with other platforms. [https://gitlab.kitware.com/cmake/cmake/-/issues/19494]  This issue explains more about why cmake is implementing shared library as `.a` archive library since cmake 3.16.0. In brief, typically in AIX system shared libraries are archive files. This makes it easier to provide updates to the system libraries with minimum impact to the applications.

So we'd like to take advantage of this cmake updates in this patch.

Regading `CMAKE_SHARED_MODULE_SUFFIX`, I think it's a viable option. It's better than hardcoding `.so`. Thanks.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D96282/new/

https://reviews.llvm.org/D96282



More information about the llvm-commits mailing list