[examples] Add an example of how to use JITLink and small-code-model with LLJIT.
JITLink is LLVM's newer jit-linker. It is an alternative to (and hopefully eventually a replacement for) LLVM's older jit-linker, RuntimeDyld. Unlike RuntimeDyld which requries JIT'd code to be complied with the large code model, JITlink can link code compiled with the small code model, which is the native code model for a number of targets (including all supported MachO targets). This example shows how to: -- Create a JITLink InProcessMemoryManager -- Set the code model to small -- Use a JITLink backed ObjectLinkingLayer as the linking layer for LLJIT (rather than the default RTDyldObjectLinkingLayer). Note: This example will only work on platforms supported by JITLink. As of this commit that's MachO/x86-64 and MachO/arm64. llvm-svn: 375266
Loading
Please register or sign in to comment