Skip to content

Commit af826bb

Browse files
committed
Only add SwiftMacros dependencies when we are building with swift-syntax enabled
1 parent 6221b29 commit af826bb

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

stdlib/cmake/modules/SwiftSource.cmake

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -890,8 +890,11 @@ function(_compile_swift_files
890890
# cross-compiling the compiler.
891891
list(APPEND swift_compiler_tool_dep "swift-frontend${target_suffix}")
892892

893-
# If we aren't cross compiling, also depend on SwiftMacros.
894-
list(APPEND swift_compiler_tool_dep SwiftMacros)
893+
# If we aren't cross compiling and have swift-syntax, also depend on
894+
# SwiftMacros.
895+
if(SWIFT_BUILD_SWIFT_SYNTAX)
896+
list(APPEND swift_compiler_tool_dep SwiftMacros)
897+
endif()
895898
endif()
896899

897900
# If there are more than one output files, we assume that they are specified

0 commit comments

Comments
 (0)