<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hey Russel<br>
    <br>
    RTDyldObjectLinkingLayer is the regular one, which makes use of
    RuntimeDyld under the hood. This should be the default and work with
    both, OrcV1 and OrcV2.<br>
    <br>
    ObjectLinkingLayer is the layer that Lang plans to use for JITLink.
    This was added very recently [1] with the ultimate goal to get rid
    of RuntimeDyld, which allows relaxed constraints on the used
    CodeModel, better supports concurrency and overcomes hacks like [2].
    It's definitely not something you want to use in production at this
    point. It lacks a number of features compared to RuntimeDlyld, i.e.
    backends for all object formats except Mach-O and compatibility with
    JITEventListeners.<br>
    <br>
    If you look for RTDyldObjectLinkingLayer examples in-tree, see how
    LLJIT does it [3] and how lli uses LLLazyJIT [4].<br>
    Out-of-tree you can have a look at my example project if you like:
    it shows how to build on LLJIT [5] and how to break free from it
    [6]. This is much more focused than the in-tree code.<br>
    <br>
    Hope it helps.<br>
    Best, Stefan<br>
    <br>
    --<br>
    <br>
    [1] <a class="moz-txt-link-freetext" href="https://reviews.llvm.org/D58704">https://reviews.llvm.org/D58704</a><br>
    [2]
<a class="moz-txt-link-freetext" href="https://github.com/llvm/llvm-project/blob/198611b0/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp#L1388">https://github.com/llvm/llvm-project/blob/198611b0/llvm/lib/ExecutionEngine/RuntimeDyld/RuntimeDyld.cpp#L1388</a><br>
    [3]
<a class="moz-txt-link-freetext" href="https://github.com/llvm/llvm-project/blob/777cad2c/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp#L86">https://github.com/llvm/llvm-project/blob/777cad2c/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp#L86</a><br>
    [4]
<a class="moz-txt-link-freetext" href="https://github.com/llvm/llvm-project/blob/777cad2c/llvm/tools/lli/lli.cpp#L754">https://github.com/llvm/llvm-project/blob/777cad2c/llvm/tools/lli/lli.cpp#L754</a><br>
    [5] <a class="moz-txt-link-freetext" href="https://github.com/weliveindetail/JitFromScratch/commit/a61a3a9">https://github.com/weliveindetail/JitFromScratch/commit/a61a3a9</a><br>
    [6] <a class="moz-txt-link-freetext" href="https://github.com/weliveindetail/JitFromScratch/commit/b5bcb5e">https://github.com/weliveindetail/JitFromScratch/commit/b5bcb5e</a><br>
    <br>
    <div class="moz-cite-prefix">On 5/13/19 12:15 PM, Russell Wallace
      via llvm-dev wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAH+nB+y9v4FvVp6nPAZXOh4bh9uJKAuaURHSQNQZu3yZAif3JA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div dir="ltr">It turns out that ObjectLinkingLayer doesn't
          exist; that identifier occurs in the source tree only in
          comments, never as an identifier.</div>
        <div dir="ltr"><br>
        </div>
        <div>Does that mean the second version of the API has been
          deleted and the first is now correct?</div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Fri, May 10, 2019 at 6:18
          AM Praveen Velliengiri <<a
            href="mailto:praveenvelliengiri@gmail.com"
            moz-do-not-send="true">praveenvelliengiri@gmail.com</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div dir="ltr">
            <div>Hi Russell</div>
            <div>As far as I know, the second is preferred. You can also
              look at the LLJIT && LLLazyJIT stack in the trunk
              which is off the shelf utility. <br>
            </div>
            <div>Thanks<br>
            </div>
          </div>
          <br>
          <div class="gmail_quote">
            <div dir="ltr" class="gmail_attr">On Fri, 10 May 2019 at
              08:20, Russell Wallace via llvm-dev <<a
                href="mailto:llvm-dev@lists.llvm.org" target="_blank"
                moz-do-not-send="true">llvm-dev@lists.llvm.org</a>>
              wrote:<br>
            </div>
            <blockquote class="gmail_quote" style="margin:0px 0px 0px
              0.8ex;border-left:1px solid
              rgb(204,204,204);padding-left:1ex">
              <div dir="ltr">
                <div dir="ltr">
                  <div dir="ltr">Trying to put together a simple test
                    JIT compiler, using ORC which as I understand it
                    will be the supported API going forward, I noticed
                    that in the first chapter of the updated
                    Kaleidoscope tutorial, there is sample code that
                    starts like this:
                    <div><br>
                    </div>
                    <div>
                      <div>ExecutionSession ES;</div>
                      <div>RTDyldObjectLinkingLayer ObjectLayer;</div>
                      <div>IRCompileLayer CompileLayer;</div>
                      <div><br>
                      </div>
                      <div>DataLayout DL;</div>
                      <div>MangleAndInterner Mangle;</div>
                      <div>ThreadSafeContext Ctx;</div>
                    </div>
                    <div><br>
                    </div>
                    <div>But in <a
                        href="https://llvm.org/devmtg/2016-11/Slides/Hames-ORC.pdf"
                        target="_blank" moz-do-not-send="true">https://llvm.org/devmtg/2016-11/Slides/Hames-ORC.pdf</a> there
                      is sample code that looks like this:</div>
                    <div><br>
                    </div>
                    <div>
                      <div>ObjectLinkingLayer LinkLayer;</div>
                      <div>SimpleCompiler Compiler(TargetMachine());</div>
                      <div>IRCompileLayer<…>
                        CompileLayer(LinkLayer, Compiler);</div>
                    </div>
                    <div><br>
                    </div>
                    <div>Related but significantly different.</div>
                    <div><br>
                    </div>
                    <div>Which version is now considered
                      correct/preferred?</div>
                  </div>
                </div>
              </div>
              _______________________________________________<br>
              LLVM Developers mailing list<br>
              <a href="mailto:llvm-dev@lists.llvm.org" target="_blank"
                moz-do-not-send="true">llvm-dev@lists.llvm.org</a><br>
              <a
                href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev"
                rel="noreferrer" target="_blank" moz-do-not-send="true">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
            </blockquote>
          </div>
        </blockquote>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-freetext" href="https://flowcrypt.com/pub/stefan.graenitz@gmail.com">https://flowcrypt.com/pub/stefan.graenitz@gmail.com</a></pre>
  </body>
</html>