This is an archive of the discontinued LLVM Phabricator instance.

Implemented LLVMOrcCreateDynamicLibararySearchGeneratorForPath and LLVMOrcCreateStaticLibrarySearchGeneratorForPath for C -API.
ClosedPublic

Authored by tpisto on Aug 23 2021, 2:48 AM.

Details

Summary

Implemented new functions for Orc V2 C-API:

LLVMOrcCreateDynamicLibararySearchGeneratorForPath
LLVMOrcCreateStaticLibrarySearchGeneratorForPath

Also created test cases for those and 2 test files.

Diff Detail

Event Timeline

tpisto created this revision.Aug 23 2021, 2:48 AM
tpisto requested review of this revision.Aug 23 2021, 2:48 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 23 2021, 2:48 AM

Hi Tommi,

Thanks very much for working on these!

The pre-built archive and dylib are causing test failures on non-Darwin platforms. I haven't checked whether there's an easy way to build static and dynamic libraries from source for these tests. If there is then you should use that, but if not I'm ok with these APIs going in with an OrcV2Examples example and a TODO, rather than unit tests.

llvm/include/llvm-c/Orc.h
941–943

Could you add a note that this API is experimental, and likely to change in the near future?

(The basic concept is stable, but I think we might want to revisit how filters work to make them more efficient)

956–958

Could you also add a note that this API is experimental and subject to change?

We're in the process of tightening integration between ExecutionSession and ExecutorProcessControl. I think we can already look through the chain ObjLayer -> ExecutionSession -> ExecutorProcessControl to find the triple, but I'm not sure if that's set reliably in all cases. Once it is we will be able to drop the TargetTriple argument here.

tpisto updated this revision to Diff 369411.Aug 30 2021, 3:52 AM

Removed unit tests and added experimental api warning.

lhames accepted this revision.Sep 26 2021, 11:39 AM

LGTM. Thanks Tommi!

This revision is now accepted and ready to land.Sep 26 2021, 11:39 AM
This revision was landed with ongoing or failed builds.Oct 11 2021, 9:26 AM
This revision was automatically updated to reflect the committed changes.