[PATCH] D90041: [AIX][cmake] Adjust management of `-G` for linking

David Tenty via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 23 12:54:10 PDT 2020


daltenty added inline comments.


================
Comment at: llvm/CMakeLists.txt:939
+  # with plugins.
+  string(APPEND CMAKE_MODULE_LINKER_FLAGS " -shared -Wl,-G")
 
----------------
hubert.reinterpretcast wrote:
> daltenty wrote:
> > An aside: we should consider if this is worth mentioning to upstream CMake.
> @daltenty, this is building on your prior work to reduce the run-time linking exposure. It seems upstream CMake does understand the need on AIX for `-shared -Wl,-G` for non-XL and `-G` for XL when the intent is to use run-time linking. That is, out-of-the-box, I think CMake works if we were happy with the run-time linking. It seems the ability for a user to communicate the run-time linking intent in terms of CMake may be where there is a gap.
The runtime linking aspect was fixed in CMake 3.16: https://gitlab.kitware.com/cmake/cmake/-/issues/19163 . After that version -G  / runtime linking is dropped from the default options.

I'm more referring to the fact that `CMAKE_MODULE_LINKER_FLAGS` seems like it should probably contain `-shared` out-of-the-box


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D90041



More information about the llvm-commits mailing list