Skip to content

[CMake] Fix dependencies found using LLVM's -DBUILD_SHARED_LIBS=TRUE #22651

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/FrontendTool/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ add_swift_host_library(swiftFrontendTool STATIC
swiftClangImporter
swiftDWARFImporter
swiftOption
INTERFACE_LINK_LIBRARIES
clangAPINotes
clangBasic
)
5 changes: 5 additions & 0 deletions lib/IRGen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,13 @@ add_swift_host_library(swiftIRGen STATIC
swiftSILGen
swiftSILOptimizer

INTERFACE_LINK_LIBRARIES
# Clang dependencies.
# FIXME: Clang should really export these in some reasonable manner.
clangCodeGen
clangAST

LLVM_COMPONENT_DEPENDS
target
transformutils
)
5 changes: 4 additions & 1 deletion lib/Immediate/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@ add_swift_host_library(swiftImmediate STATIC
swiftSILOptimizer
swiftIRGen
LLVM_COMPONENT_DEPENDS
linker mcjit)
executionengine
linker
mcjit
transformutils)

2 changes: 2 additions & 0 deletions lib/TBDGen/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ add_swift_host_library(swiftTBDGen STATIC
LINK_LIBRARIES
swiftAST
swiftSIL
LLVM_COMPONENT_DEPENDS
demangle
)
9 changes: 8 additions & 1 deletion tools/swift-llvm-opt/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,11 @@ target_link_libraries(swift-llvm-opt
swiftAST
# Clang libraries included to appease the linker on linux.
clangBasic
clangCodeGen)
clangCodeGen
# LLVM libraries included to appease the linker on linux.
LLVMAggressiveInstCombine
LLVMCodeGen
LLVMInstCombine
LLVMScalarOpts
LLVMVectorize
)