Skip to content

Commit aac3cd7

Browse files
committed
[cmake] Prevent linker errors by linking libswiftAST into SwiftBasicTests since libswiftBasic can include contents from libswiftAST.
I hit this in #72476. I put the declaration that hit this in a header, but as I thought about it... there was no real harm in just fixing the issue and preventing future breakage.
1 parent f24e18c commit aac3cd7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

unittests/Basic/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ add_dependencies(SwiftBasicTests "${gyb_dependency_targets}")
4848
target_link_libraries(SwiftBasicTests
4949
PRIVATE
5050
swiftBasic
51+
# SwiftBasic can include symbols from swiftAST due to swiftBasic including
52+
# headers from AST. Just include SwiftAST so that we do not have linker
53+
# failures.
54+
swiftAST
5155
swiftThreading
5256
clangBasic
5357
LLVMTestingSupport

0 commit comments

Comments
 (0)