ObjectLinkingLayer Plugin on windows (original) (raw)

Hello,

Is it possible to use the ObjectLinkingLayer Plugin on windows?
I compiled and ran “OrcV2Examples\LLJITWithObjectLinkingLayerPlugin”, but I got the following error.

JIT session error: Symbols not found: [ __ImageBase ]
LLJITWithObjectLinkingLayerPlugin.exe: Failed to materialize symbols: { (main, { entry, callee }) }

Is this feature not available on winodws?
Do I need to modify the example code?

Environment:

Thank you.

Endill August 1, 2023, 6:43am 2

AFAIK plugins are not supported on Windows.

ray-ymd August 15, 2023, 4:43pm 3

I solved it myself.
Using orc-runtime, I can apply ObjectLinkingLayer Plugin to JIT on windows.

I modified the example code for LLJITBuilder configuration as follows:

auto J = ExitOnErr(
      LLJITBuilder()
          .setJITTargetMachineBuilder(std::move(JTMB))
          .setPlatformSetUp(orc::ExecutorNativePlatform( [path to "orc_rt-x86_64.lib"] ))   // Added this line.
          .setObjectLinkingLayerCreator(
           ...
           )

I created “orc_rt-x86_64.lib” by building “compiler-rt” included in the LLVM project.