[llvm] b92839c - Re-apply "[ORC][LLJIT] Use JITLink by default on ELF/x86-64." with fixes.
Lang Hames via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 23 03:20:16 PDT 2023
Author: Lang Hames
Date: 2023-04-23T10:20:09Z
New Revision: b92839c9548a55bc7a3267b05d11c9d9c530b792
URL: https://github.com/llvm/llvm-project/commit/b92839c9548a55bc7a3267b05d11c9d9c530b792
DIFF: https://github.com/llvm/llvm-project/commit/b92839c9548a55bc7a3267b05d11c9d9c530b792.diff
LOG: Re-apply "[ORC][LLJIT] Use JITLink by default on ELF/x86-64." with fixes.
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.
Added:
Modified:
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
Removed:
################################################################################
diff --git a/llvm/examples/OrcV2Examples/LLJITDumpObjects/CMakeLists.txt b/llvm/examples/OrcV2Examples/LLJITDumpObjects/CMakeLists.txt
index 3d83ee6864d33..42b9d1c4f9ae8 100644
--- a/llvm/examples/OrcV2Examples/LLJITDumpObjects/CMakeLists.txt
+++ b/llvm/examples/OrcV2Examples/LLJITDumpObjects/CMakeLists.txt
@@ -11,3 +11,5 @@ set(LLVM_LINK_COMPONENTS
add_llvm_example(LLJITDumpObjects
LLJITDumpObjects.cpp
)
+
+export_executable_symbols(LLJITDumpObjects)
diff --git a/llvm/examples/OrcV2Examples/LLJITRemovableCode/CMakeLists.txt b/llvm/examples/OrcV2Examples/LLJITRemovableCode/CMakeLists.txt
index 3ab58c1c1f308..2c0036f625607 100644
--- a/llvm/examples/OrcV2Examples/LLJITRemovableCode/CMakeLists.txt
+++ b/llvm/examples/OrcV2Examples/LLJITRemovableCode/CMakeLists.txt
@@ -12,3 +12,5 @@ set(LLVM_LINK_COMPONENTS
add_llvm_example(LLJITRemovableCode
LLJITRemovableCode.cpp
)
+
+export_executable_symbols(LLJITRemovableCode)
diff --git a/llvm/examples/OrcV2Examples/LLJITWithCustomObjectLinkingLayer/CMakeLists.txt b/llvm/examples/OrcV2Examples/LLJITWithCustomObjectLinkingLayer/CMakeLists.txt
index 6034fc6791127..85e11ec1368e0 100644
--- a/llvm/examples/OrcV2Examples/LLJITWithCustomObjectLinkingLayer/CMakeLists.txt
+++ b/llvm/examples/OrcV2Examples/LLJITWithCustomObjectLinkingLayer/CMakeLists.txt
@@ -10,3 +10,5 @@ set(LLVM_LINK_COMPONENTS
add_llvm_example(LLJITWithCustomObjectLinkingLayer
LLJITWithCustomObjectLinkingLayer.cpp
)
+
+export_executable_symbols(LLJITWithCustomObjectLinkingLayer)
diff --git a/llvm/examples/OrcV2Examples/LLJITWithInitializers/CMakeLists.txt b/llvm/examples/OrcV2Examples/LLJITWithInitializers/CMakeLists.txt
index 302647564ab81..ed466f4e40652 100644
--- a/llvm/examples/OrcV2Examples/LLJITWithInitializers/CMakeLists.txt
+++ b/llvm/examples/OrcV2Examples/LLJITWithInitializers/CMakeLists.txt
@@ -11,3 +11,5 @@ set(LLVM_LINK_COMPONENTS
add_llvm_example(LLJITWithInitializers
LLJITWithInitializers.cpp
)
+
+export_executable_symbols(LLJITWithInitializers)
diff --git a/llvm/examples/OrcV2Examples/LLJITWithLazyReexports/CMakeLists.txt b/llvm/examples/OrcV2Examples/LLJITWithLazyReexports/CMakeLists.txt
index cdff74b10ad03..2ed22e161139c 100644
--- a/llvm/examples/OrcV2Examples/LLJITWithLazyReexports/CMakeLists.txt
+++ b/llvm/examples/OrcV2Examples/LLJITWithLazyReexports/CMakeLists.txt
@@ -10,3 +10,5 @@ set(LLVM_LINK_COMPONENTS
add_llvm_example(LLJITWithLazyReexports
LLJITWithLazyReexports.cpp
)
+
+export_executable_symbols(LLJITWithLazyReexports)
diff --git a/llvm/examples/OrcV2Examples/LLJITWithObjectCache/CMakeLists.txt b/llvm/examples/OrcV2Examples/LLJITWithObjectCache/CMakeLists.txt
index c5f8fd6a97a7f..a4eaaadf01521 100644
--- a/llvm/examples/OrcV2Examples/LLJITWithObjectCache/CMakeLists.txt
+++ b/llvm/examples/OrcV2Examples/LLJITWithObjectCache/CMakeLists.txt
@@ -10,3 +10,5 @@ set(LLVM_LINK_COMPONENTS
add_llvm_example(LLJITWithObjectCache
LLJITWithObjectCache.cpp
)
+
+export_executable_symbols(LLJITWithObjectCache)
diff --git a/llvm/examples/OrcV2Examples/LLJITWithObjectLinkingLayerPlugin/CMakeLists.txt b/llvm/examples/OrcV2Examples/LLJITWithObjectLinkingLayerPlugin/CMakeLists.txt
index 54814621a5a5f..6177d4596e369 100644
--- a/llvm/examples/OrcV2Examples/LLJITWithObjectLinkingLayerPlugin/CMakeLists.txt
+++ b/llvm/examples/OrcV2Examples/LLJITWithObjectLinkingLayerPlugin/CMakeLists.txt
@@ -10,3 +10,5 @@ set(LLVM_LINK_COMPONENTS
add_llvm_example(LLJITWithObjectLinkingLayerPlugin
LLJITWithObjectLinkingLayerPlugin.cpp
)
+
+export_executable_symbols(LLJITWithObjectLinkingLayerPlugin)
diff --git a/llvm/examples/OrcV2Examples/LLJITWithOptimizingIRTransform/CMakeLists.txt b/llvm/examples/OrcV2Examples/LLJITWithOptimizingIRTransform/CMakeLists.txt
index a9cd91ad596ad..b40e30911c4a9 100644
--- a/llvm/examples/OrcV2Examples/LLJITWithOptimizingIRTransform/CMakeLists.txt
+++ b/llvm/examples/OrcV2Examples/LLJITWithOptimizingIRTransform/CMakeLists.txt
@@ -12,3 +12,5 @@ set(LLVM_LINK_COMPONENTS
add_llvm_example(LLJITWithOptimizingIRTransform
LLJITWithOptimizingIRTransform.cpp
)
+
+export_executable_symbols(LLJITWithOptimizingIRTransform)
diff --git a/llvm/examples/OrcV2Examples/LLJITWithRemoteDebugging/CMakeLists.txt b/llvm/examples/OrcV2Examples/LLJITWithRemoteDebugging/CMakeLists.txt
index b8ee383d16fc6..576603c47f593 100644
--- a/llvm/examples/OrcV2Examples/LLJITWithRemoteDebugging/CMakeLists.txt
+++ b/llvm/examples/OrcV2Examples/LLJITWithRemoteDebugging/CMakeLists.txt
@@ -19,4 +19,6 @@ if (LLVM_INCLUDE_UTILS)
DEPENDS
llvm-jitlink-executor
)
+
+ export_executable_symbols(LLJITWithRemoteDebugging)
endif()
diff --git a/llvm/examples/OrcV2Examples/LLJITWithThinLTOSummaries/CMakeLists.txt b/llvm/examples/OrcV2Examples/LLJITWithThinLTOSummaries/CMakeLists.txt
index 5ce2fb498f334..148b1aaa10833 100644
--- a/llvm/examples/OrcV2Examples/LLJITWithThinLTOSummaries/CMakeLists.txt
+++ b/llvm/examples/OrcV2Examples/LLJITWithThinLTOSummaries/CMakeLists.txt
@@ -12,3 +12,5 @@ set(LLVM_LINK_COMPONENTS
add_llvm_example(LLJITWithThinLTOSummaries
LLJITWithThinLTOSummaries.cpp
)
+
+export_executable_symbols(LLJITWithThinLTOSummaries)
diff --git a/llvm/examples/OrcV2Examples/OrcV2CBindingsAddObjectFile/CMakeLists.txt b/llvm/examples/OrcV2Examples/OrcV2CBindingsAddObjectFile/CMakeLists.txt
index cc50112f326ea..376ee1d8af5d4 100644
--- a/llvm/examples/OrcV2Examples/OrcV2CBindingsAddObjectFile/CMakeLists.txt
+++ b/llvm/examples/OrcV2Examples/OrcV2CBindingsAddObjectFile/CMakeLists.txt
@@ -13,3 +13,5 @@ set(LLVM_LINK_COMPONENTS
add_llvm_example(OrcV2CBindingsAddObjectFile
OrcV2CBindingsAddObjectFile.c
)
+
+export_executable_symbols(OrcV2CBindingsAddObjectFile)
diff --git a/llvm/examples/OrcV2Examples/OrcV2CBindingsBasicUsage/CMakeLists.txt b/llvm/examples/OrcV2Examples/OrcV2CBindingsBasicUsage/CMakeLists.txt
index 0f18d6c24912f..3e0ac3971dc45 100644
--- a/llvm/examples/OrcV2Examples/OrcV2CBindingsBasicUsage/CMakeLists.txt
+++ b/llvm/examples/OrcV2Examples/OrcV2CBindingsBasicUsage/CMakeLists.txt
@@ -13,3 +13,5 @@ set(LLVM_LINK_COMPONENTS
add_llvm_example(OrcV2CBindingsBasicUsage
OrcV2CBindingsBasicUsage.c
)
+
+export_executable_symbols(OrcV2CBindingsBasicUsage)
diff --git a/llvm/examples/OrcV2Examples/OrcV2CBindingsDumpObjects/CMakeLists.txt b/llvm/examples/OrcV2Examples/OrcV2CBindingsDumpObjects/CMakeLists.txt
index 8e2c97d782062..ad927d191a570 100644
--- a/llvm/examples/OrcV2Examples/OrcV2CBindingsDumpObjects/CMakeLists.txt
+++ b/llvm/examples/OrcV2Examples/OrcV2CBindingsDumpObjects/CMakeLists.txt
@@ -13,3 +13,5 @@ set(LLVM_LINK_COMPONENTS
add_llvm_example(OrcV2CBindingsDumpObjects
OrcV2CBindingsDumpObjects.c
)
+
+export_executable_symbols(OrcV2CBindingsDumpObjects)
diff --git a/llvm/examples/OrcV2Examples/OrcV2CBindingsIRTransforms/CMakeLists.txt b/llvm/examples/OrcV2Examples/OrcV2CBindingsIRTransforms/CMakeLists.txt
index af1b43e43e111..c90534c87954c 100644
--- a/llvm/examples/OrcV2Examples/OrcV2CBindingsIRTransforms/CMakeLists.txt
+++ b/llvm/examples/OrcV2Examples/OrcV2CBindingsIRTransforms/CMakeLists.txt
@@ -14,3 +14,5 @@ set(LLVM_LINK_COMPONENTS
add_llvm_example(OrcV2CBindingsIRTransforms
OrcV2CBindingsIRTransforms.c
)
+
+export_executable_symbols(OrcV2CBindingsIRTransforms)
diff --git a/llvm/examples/OrcV2Examples/OrcV2CBindingsLazy/CMakeLists.txt b/llvm/examples/OrcV2Examples/OrcV2CBindingsLazy/CMakeLists.txt
index 52eb2d496fc23..74238cbce8af3 100644
--- a/llvm/examples/OrcV2Examples/OrcV2CBindingsLazy/CMakeLists.txt
+++ b/llvm/examples/OrcV2Examples/OrcV2CBindingsLazy/CMakeLists.txt
@@ -13,3 +13,5 @@ set(LLVM_LINK_COMPONENTS
add_llvm_example(OrcV2CBindingsLazy
OrcV2CBindingsLazy.c
)
+
+export_executable_symbols(OrcV2CBindingsLazy)
diff --git a/llvm/examples/OrcV2Examples/OrcV2CBindingsRemovableCode/CMakeLists.txt b/llvm/examples/OrcV2Examples/OrcV2CBindingsRemovableCode/CMakeLists.txt
index 5b737557bb1ef..65299ff871f18 100644
--- a/llvm/examples/OrcV2Examples/OrcV2CBindingsRemovableCode/CMakeLists.txt
+++ b/llvm/examples/OrcV2Examples/OrcV2CBindingsRemovableCode/CMakeLists.txt
@@ -13,3 +13,5 @@ set(LLVM_LINK_COMPONENTS
add_llvm_example(OrcV2CBindingsRemovableCode
OrcV2CBindingsRemovableCode.c
)
+
+export_executable_symbols(OrcV2CBindingsRemovableCode)
diff --git a/llvm/examples/OrcV2Examples/OrcV2CBindingsVeryLazy/CMakeLists.txt b/llvm/examples/OrcV2Examples/OrcV2CBindingsVeryLazy/CMakeLists.txt
index 0bc9610b1ad7e..5d3e730e29e25 100644
--- a/llvm/examples/OrcV2Examples/OrcV2CBindingsVeryLazy/CMakeLists.txt
+++ b/llvm/examples/OrcV2Examples/OrcV2CBindingsVeryLazy/CMakeLists.txt
@@ -13,3 +13,5 @@ set(LLVM_LINK_COMPONENTS
add_llvm_example(OrcV2CBindingsVeryLazy
OrcV2CBindingsVeryLazy.c
)
+
+export_executable_symbols(OrcV2CBindingsVeryLazy)
diff --git a/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp b/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
index a65c3567c1487..d61dde836fa75 100644
--- a/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
+++ b/llvm/lib/ExecutionEngine/Orc/LLJIT.cpp
@@ -750,7 +750,7 @@ Error LLJITBuilderState::prepareForConstruction() {
UseJITLink = !TT.isOSBinFormatCOFF();
break;
case Triple::x86_64:
- UseJITLink = TT.isOSBinFormatMachO();
+ UseJITLink = !TT.isOSBinFormatCOFF();
break;
default:
break;
More information about the llvm-commits
mailing list