Skip to content

Commit 6a53f67

Browse files
committed
[CMake] Fix dependencies found using LLVM's -DBUILD_SHARED_LIBS=TRUE
1 parent 275be44 commit 6a53f67

File tree

5 files changed

+20
-2
lines changed

5 files changed

+20
-2
lines changed

lib/FrontendTool/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ add_swift_host_library(swiftFrontendTool STATIC
1717
swiftClangImporter
1818
swiftDWARFImporter
1919
swiftOption
20+
INTERFACE_LINK_LIBRARIES
2021
clangAPINotes
2122
clangBasic
2223
)

lib/IRGen/CMakeLists.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,13 @@ add_swift_host_library(swiftIRGen STATIC
5757
swiftSILGen
5858
swiftSILOptimizer
5959

60+
INTERFACE_LINK_LIBRARIES
6061
# Clang dependencies.
6162
# FIXME: Clang should really export these in some reasonable manner.
6263
clangCodeGen
6364
clangAST
65+
66+
LLVM_COMPONENT_DEPENDS
67+
target
68+
transformutils
6469
)

lib/Immediate/CMakeLists.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,8 @@ add_swift_host_library(swiftImmediate STATIC
88
swiftSILOptimizer
99
swiftIRGen
1010
LLVM_COMPONENT_DEPENDS
11-
linker mcjit)
11+
executionengine
12+
linker
13+
mcjit
14+
transformutils)
1215

lib/TBDGen/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ add_swift_host_library(swiftTBDGen STATIC
66
LINK_LIBRARIES
77
swiftAST
88
swiftSIL
9+
LLVM_COMPONENT_DEPENDS
10+
demangle
911
)

tools/swift-llvm-opt/CMakeLists.txt

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,11 @@ target_link_libraries(swift-llvm-opt
1010
swiftAST
1111
# Clang libraries included to appease the linker on linux.
1212
clangBasic
13-
clangCodeGen)
13+
clangCodeGen
14+
# LLVM libraries included to appease the linker on linux.
15+
LLVMAggressiveInstCombine
16+
LLVMCodeGen
17+
LLVMInstCombine
18+
LLVMScalarOpts
19+
LLVMVectorize
20+
)

0 commit comments

Comments
 (0)