From f12628ef2a4b3b71cd9ded1147f8889b33f4f81f Mon Sep 17 00:00:00 2001 From: Hubert Tong Date: Mon, 19 Aug 2019 23:12:48 +0000 Subject: [PATCH] [cmake] Link in LLVMPasses due to dependency by LLVMOrcJIT; NFC Summary: rL367756 (f5c40cb) increases the dependency of LLVMOrcJIT on LLVMPasses. In particular, symbols defined in LLVMPasses that are referenced by the destructor of `PassBuilder` are now referenced by LLVMOrcJIT through `Speculation.cpp.o`. We believe that referencing symbols defined in LLVMPasses in the destructor of `PassBuilder` is valid, and that adding to the set of such symbols is legitimate. To support such cases, this patch adds LLVMPasses to the set of libraries being linked when linking in LLVMOrcJIT causes such symbols from LLVMPasses to be referenced. Reviewers: Whitney, anhtuyen, pree-jackie Reviewed By: pree-jackie Subscribers: mgorny, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66441 llvm-svn: 369310 --- lib/ExecutionEngine/Orc/CMakeLists.txt | 1 + tools/lli/CMakeLists.txt | 1 + unittests/ExecutionEngine/Orc/CMakeLists.txt | 1 + 3 files changed, 3 insertions(+) diff --git a/lib/ExecutionEngine/Orc/CMakeLists.txt b/lib/ExecutionEngine/Orc/CMakeLists.txt index 94d84b6a723..6c0881d4b25 100644 --- a/lib/ExecutionEngine/Orc/CMakeLists.txt +++ b/lib/ExecutionEngine/Orc/CMakeLists.txt @@ -35,4 +35,5 @@ target_link_libraries(LLVMOrcJIT LLVMAnalysis LLVMBitReader LLVMBitWriter + LLVMPasses ) diff --git a/tools/lli/CMakeLists.txt b/tools/lli/CMakeLists.txt index 42f6c2b2ede..476c09229e6 100644 --- a/tools/lli/CMakeLists.txt +++ b/tools/lli/CMakeLists.txt @@ -12,6 +12,7 @@ set(LLVM_LINK_COMPONENTS MCJIT Object OrcJIT + Passes RuntimeDyld SelectionDAG Support diff --git a/unittests/ExecutionEngine/Orc/CMakeLists.txt b/unittests/ExecutionEngine/Orc/CMakeLists.txt index 76b18fd1ba9..945c9926d26 100644 --- a/unittests/ExecutionEngine/Orc/CMakeLists.txt +++ b/unittests/ExecutionEngine/Orc/CMakeLists.txt @@ -4,6 +4,7 @@ set(LLVM_LINK_COMPONENTS ExecutionEngine Object OrcJIT + Passes RuntimeDyld Support native