[all-commits] [llvm/llvm-project] 1ac3f8: [examples] Add an example of how to use JITLink an...

lhames via All-commits all-commits at lists.llvm.org
Fri Oct 18 11:24:11 PDT 2019

  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 1ac3f80a6a097afd776e925fee4b1176b4383d7f
  Author: Lang Hames <lhames at gmail.com>
  Date:   2019-10-18 (Fri, 18 Oct 2019)

  Changed paths:
    M llvm/examples/LLJITExamples/CMakeLists.txt
    A llvm/examples/LLJITExamples/LLJITWithJITLink/CMakeLists.txt
    A llvm/examples/LLJITExamples/LLJITWithJITLink/LLJITWithJITLink.cpp

  Log Message:
  [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

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

More information about the All-commits mailing list