[PATCH] D159085: [lli] Make sure the exported __chkstk functions are included when exporting them

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 29 13:07:24 PDT 2023


mstorsjo added inline comments.


================
Comment at: llvm/tools/lli/lli.cpp:1204
 // Therefore, manually export the relevant symbol from lli, to let it be
 // found at runtime during tests.
 //
----------------
mati865 wrote:
> Should we update this comment?
> This workaround is also required for linking to shared libraries.
Do you mean if building an user application that does JIT, against the LLVM libraries? Yeah, the same issue applies there as well (regardless of whether it's linked shared or statically) - doing it within the `lli` executable just fixes it for the executable and none of the lib users. There's a TODO down below that this really should be handled by ORC.

And ideally we shouldn't just be exporting this function, ideally ORC should find the right `libclang_rt.builtins*.a` and link in that, it's just that the chkstk functions are the most blatant examples of it.

Put another way - I wasn't really planning on working on the JIT stuff, I just wanted to make `check-llvm` run successfully in mingw builds; first I tried just mark most of the JIT tests unsupported for mingw configs, but @lhames made and suggested some fixes that brought us to this point instead. The root issue isn't really solved but the tests at least run.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D159085



More information about the llvm-commits mailing list