[ORC] Always use ObjectLinkingLayer/JITLink for MachO on x86-64 and arm64.
authorLang Hames <lhames@gmail.com>
Fri, 5 Jun 2020 21:08:15 +0000 (14:08 -0700)
committerLang Hames <lhames@gmail.com>
Sat, 6 Jun 2020 04:02:29 +0000 (21:02 -0700)
JITLink supports all code and relocation models, so there's no reason to
conditionalize using JITLink on the code or relocation model settings.

Clients wanting to use RTDyldObjectLinkingLayer/RuntimeDyld will now
need to use a custom object linking layer creator.

llvm/lib/ExecutionEngine/Orc/LLJIT.cpp

index 0e51ba1..713a48f 100644 (file)
@@ -965,9 +965,7 @@ Error LLJITBuilderState::prepareForConstruction() {
 
   // If the client didn't configure any linker options then auto-configure the
   // JIT linker.
-  if (!CreateObjectLinkingLayer && JTMB->getCodeModel() == None &&
-      JTMB->getRelocationModel() == None) {
-
+  if (!CreateObjectLinkingLayer) {
     auto &TT = JTMB->getTargetTriple();
     if (TT.isOSBinFormatMachO() &&
         (TT.getArch() == Triple::aarch64 || TT.getArch() == Triple::x86_64)) {