Re-apply "[ORC][LLJIT] Use JITLink by default on ELF/x86-64." with fixes.
authorLang Hames <lhames@gmail.com>
Fri, 21 Apr 2023 04:45:46 +0000 (04:45 +0000)
committerLang Hames <lhames@gmail.com>
Sun, 23 Apr 2023 10:20:09 +0000 (10:20 +0000)
This reapplies 85c649bc02a, which was reverted in 35767e43d62 due to failures
with some example programs. The fix was to add export_executable_symbols to the
example programs.

18 files changed:
llvm/examples/OrcV2Examples/LLJITDumpObjects/CMakeLists.txt
llvm/examples/OrcV2Examples/LLJITRemovableCode/CMakeLists.txt
llvm/examples/OrcV2Examples/LLJITWithCustomObjectLinkingLayer/CMakeLists.txt
llvm/examples/OrcV2Examples/LLJITWithInitializers/CMakeLists.txt
llvm/examples/OrcV2Examples/LLJITWithLazyReexports/CMakeLists.txt
llvm/examples/OrcV2Examples/LLJITWithObjectCache/CMakeLists.txt
llvm/examples/OrcV2Examples/LLJITWithObjectLinkingLayerPlugin/CMakeLists.txt
llvm/examples/OrcV2Examples/LLJITWithOptimizingIRTransform/CMakeLists.txt
llvm/examples/OrcV2Examples/LLJITWithRemoteDebugging/CMakeLists.txt
llvm/examples/OrcV2Examples/LLJITWithThinLTOSummaries/CMakeLists.txt
llvm/examples/OrcV2Examples/OrcV2CBindingsAddObjectFile/CMakeLists.txt
llvm/examples/OrcV2Examples/OrcV2CBindingsBasicUsage/CMakeLists.txt
llvm/examples/OrcV2Examples/OrcV2CBindingsDumpObjects/CMakeLists.txt
llvm/examples/OrcV2Examples/OrcV2CBindingsIRTransforms/CMakeLists.txt
llvm/examples/OrcV2Examples/OrcV2CBindingsLazy/CMakeLists.txt
llvm/examples/OrcV2Examples/OrcV2CBindingsRemovableCode/CMakeLists.txt
llvm/examples/OrcV2Examples/OrcV2CBindingsVeryLazy/CMakeLists.txt
llvm/lib/ExecutionEngine/Orc/LLJIT.cpp

index 3d83ee6..42b9d1c 100644 (file)
@@ -11,3 +11,5 @@ set(LLVM_LINK_COMPONENTS
 add_llvm_example(LLJITDumpObjects
   LLJITDumpObjects.cpp
   )
+
+export_executable_symbols(LLJITDumpObjects)
index 3ab58c1..2c0036f 100644 (file)
@@ -12,3 +12,5 @@ set(LLVM_LINK_COMPONENTS
 add_llvm_example(LLJITRemovableCode
   LLJITRemovableCode.cpp
   )
+
+export_executable_symbols(LLJITRemovableCode)
index 6034fc6..85e11ec 100644 (file)
@@ -10,3 +10,5 @@ set(LLVM_LINK_COMPONENTS
 add_llvm_example(LLJITWithCustomObjectLinkingLayer
   LLJITWithCustomObjectLinkingLayer.cpp
   )
+
+export_executable_symbols(LLJITWithCustomObjectLinkingLayer)
index 3026475..ed466f4 100644 (file)
@@ -11,3 +11,5 @@ set(LLVM_LINK_COMPONENTS
 add_llvm_example(LLJITWithInitializers
   LLJITWithInitializers.cpp
   )
+
+export_executable_symbols(LLJITWithInitializers)
index cdff74b..2ed22e1 100644 (file)
@@ -10,3 +10,5 @@ set(LLVM_LINK_COMPONENTS
 add_llvm_example(LLJITWithLazyReexports
   LLJITWithLazyReexports.cpp
   )
+
+export_executable_symbols(LLJITWithLazyReexports)
index c5f8fd6..a4eaaad 100644 (file)
@@ -10,3 +10,5 @@ set(LLVM_LINK_COMPONENTS
 add_llvm_example(LLJITWithObjectCache
   LLJITWithObjectCache.cpp
   )
+
+export_executable_symbols(LLJITWithObjectCache)
index 5481462..6177d45 100644 (file)
@@ -10,3 +10,5 @@ set(LLVM_LINK_COMPONENTS
 add_llvm_example(LLJITWithObjectLinkingLayerPlugin
   LLJITWithObjectLinkingLayerPlugin.cpp
   )
+
+export_executable_symbols(LLJITWithObjectLinkingLayerPlugin)
index a9cd91a..b40e309 100644 (file)
@@ -12,3 +12,5 @@ set(LLVM_LINK_COMPONENTS
 add_llvm_example(LLJITWithOptimizingIRTransform
   LLJITWithOptimizingIRTransform.cpp
   )
+
+export_executable_symbols(LLJITWithOptimizingIRTransform)
index b8ee383..576603c 100644 (file)
@@ -19,4 +19,6 @@ if (LLVM_INCLUDE_UTILS)
     DEPENDS
       llvm-jitlink-executor
   )
+
+  export_executable_symbols(LLJITWithRemoteDebugging)
 endif()
index 5ce2fb4..148b1aa 100644 (file)
@@ -12,3 +12,5 @@ set(LLVM_LINK_COMPONENTS
 add_llvm_example(LLJITWithThinLTOSummaries
   LLJITWithThinLTOSummaries.cpp
   )
+
+export_executable_symbols(LLJITWithThinLTOSummaries)
index cc50112..376ee1d 100644 (file)
@@ -13,3 +13,5 @@ set(LLVM_LINK_COMPONENTS
 add_llvm_example(OrcV2CBindingsAddObjectFile
   OrcV2CBindingsAddObjectFile.c
   )
+
+export_executable_symbols(OrcV2CBindingsAddObjectFile)
index 0f18d6c..3e0ac39 100644 (file)
@@ -13,3 +13,5 @@ set(LLVM_LINK_COMPONENTS
 add_llvm_example(OrcV2CBindingsBasicUsage
   OrcV2CBindingsBasicUsage.c
   )
+
+export_executable_symbols(OrcV2CBindingsBasicUsage)
index 8e2c97d..ad927d1 100644 (file)
@@ -13,3 +13,5 @@ set(LLVM_LINK_COMPONENTS
 add_llvm_example(OrcV2CBindingsDumpObjects
   OrcV2CBindingsDumpObjects.c
   )
+
+export_executable_symbols(OrcV2CBindingsDumpObjects)
index af1b43e..c90534c 100644 (file)
@@ -14,3 +14,5 @@ set(LLVM_LINK_COMPONENTS
 add_llvm_example(OrcV2CBindingsIRTransforms
   OrcV2CBindingsIRTransforms.c
   )
+
+export_executable_symbols(OrcV2CBindingsIRTransforms)
index 52eb2d4..74238cb 100644 (file)
@@ -13,3 +13,5 @@ set(LLVM_LINK_COMPONENTS
 add_llvm_example(OrcV2CBindingsLazy
   OrcV2CBindingsLazy.c
   )
+
+export_executable_symbols(OrcV2CBindingsLazy)
index 5b73755..65299ff 100644 (file)
@@ -13,3 +13,5 @@ set(LLVM_LINK_COMPONENTS
 add_llvm_example(OrcV2CBindingsRemovableCode
   OrcV2CBindingsRemovableCode.c
   )
+
+export_executable_symbols(OrcV2CBindingsRemovableCode)
index 0bc9610..5d3e730 100644 (file)
@@ -13,3 +13,5 @@ set(LLVM_LINK_COMPONENTS
 add_llvm_example(OrcV2CBindingsVeryLazy
   OrcV2CBindingsVeryLazy.c
   )
+
+export_executable_symbols(OrcV2CBindingsVeryLazy)
index a65c356..d61dde8 100644 (file)
@@ -750,7 +750,7 @@ Error LLJITBuilderState::prepareForConstruction() {
       UseJITLink = !TT.isOSBinFormatCOFF();
       break;
     case Triple::x86_64:
-      UseJITLink = TT.isOSBinFormatMachO();
+      UseJITLink = !TT.isOSBinFormatCOFF();
       break;
     default:
       break;