Skip to content

Commit aa9bbad

Browse files
committed
[CMake] Only add swiftCore dependency when the new Swift parser is included.
1 parent 2c4fda5 commit aa9bbad

File tree

1 file changed

+18
-3
lines changed

1 file changed

+18
-3
lines changed

tools/driver/CMakeLists.txt

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,15 @@ if(${BOOTSTRAPPING_MODE} MATCHES "BOOTSTRAPPING.*")
1414
)
1515
target_link_libraries(swift-frontend-bootstrapping0
1616
PRIVATE
17-
swiftCore
1817
swiftDriverTool
1918
swiftCompilerStub)
2019

20+
if(SWIFT_SWIFT_PARSER)
21+
target_link_libraries(swift-frontend-bootstrapping0
22+
PRIVATE
23+
swiftCore)
24+
endif()
25+
2126
swift_create_post_build_symlink(swift-frontend-bootstrapping0
2227
SOURCE "swift-frontend${CMAKE_EXECUTABLE_SUFFIX}"
2328
DESTINATION "swiftc${CMAKE_EXECUTABLE_SUFFIX}"
@@ -34,10 +39,15 @@ if(${BOOTSTRAPPING_MODE} MATCHES "BOOTSTRAPPING.*")
3439
)
3540
target_link_libraries(swift-frontend-bootstrapping1
3641
PRIVATE
37-
swiftCore
3842
swiftDriverTool
3943
swiftCompilerModules-bootstrapping1)
4044

45+
if(SWIFT_SWIFT_PARSER)
46+
target_link_libraries(swift-frontend-bootstrapping1
47+
PRIVATE
48+
swiftCore)
49+
endif()
50+
4151
swift_create_post_build_symlink(swift-frontend-bootstrapping1
4252
SOURCE "swift-frontend${CMAKE_EXECUTABLE_SUFFIX}"
4353
DESTINATION "swiftc${CMAKE_EXECUTABLE_SUFFIX}"
@@ -51,10 +61,15 @@ add_swift_host_tool(swift-frontend
5161
)
5262
target_link_libraries(swift-frontend
5363
PUBLIC
54-
swiftCore
5564
swiftDriverTool
5665
swiftCompilerModules)
5766

67+
if(SWIFT_SWIFT_PARSER)
68+
target_link_libraries(swift-frontend
69+
PRIVATE
70+
swiftCore)
71+
endif()
72+
5873
_add_swift_runtime_link_flags(swift-frontend "../../lib" "")
5974

6075
# Create a `swift-driver` executable adjacent to the `swift-frontend` executable

0 commit comments

Comments
 (0)