[PATCH] D79749: [CMake][AIX] Add `-bcdtors:mbr` option when building with IBM XL

David Tenty via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 15 14:09:58 PDT 2020


daltenty accepted this revision.
daltenty marked an inline comment as done.
daltenty added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/cmake/modules/HandleLLVMOptions.cmake:200
+    # static storage duration even for archive members that are otherwise unreferenced.
+    # Since `--whole-archive` is not used by the LLVM build to keep such initializations for Linux,
+    # we can limit the processing for archive members to only those that are otherwise referenced.
----------------
daltenty wrote:
> `--whole-archive` is used on Linux for building the shared libraries when `-DLLVM_BUILD_LLVM_DYLIB=yes`. Do we need to be concerned about this case?
Summary of offline discussion:  AIX would use the export list mechanism in place of --whole-archive, and the export list  would make those symbols referenced so we’d pull in the initialization even with -bcdtors:mbr


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79749





More information about the llvm-commits mailing list