[PATCH] D53778: [CMAKE] Specify all_load when exporting symbols from an executable (macOS)

Joe Ranieri via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 29 06:59:04 PDT 2018


jranieri-grammatech added a comment.

In https://reviews.llvm.org/D53778#1277902, @beanz wrote:

> I'm not really sure this is the best solution. This will result in bloating the clang binary substantially. An alternative approach would be to use linker order precedence, and pass the LLVM executable first, then LLVM static archives later on the link line. That would allow minimal tool binaries, and link the LLVM bits into your plugin.


I was able to get this to work by adding `-bundle_loader /opt/clang/bin/clang-8 /opt/clang/lib/libLLVMSupport.a`. Do you think adding `-bundle_loader` is something `add_llvm_loadable_module` should be responsible for doing?


Repository:
  rL LLVM

https://reviews.llvm.org/D53778





More information about the llvm-commits mailing list