@@ -838,6 +838,24 @@ elseif(BOOTSTRAPPING_MODE STREQUAL "HOSTTOOLS" OR SWIFT_SWIFT_PARSER)
838
838
set (SWIFT_EXEC_FOR_SWIFT_MODULES "${CMAKE_Swift_COMPILER} " )
839
839
endif ()
840
840
841
+ # When we have the early SwiftSyntax build, we can include its parser.
842
+ if (SWIFT_PATH_TO_EARLYSWIFTSYNTAX_BUILD_DIR)
843
+ set (SWIFT_PATH_TO_EARLYSWIFTSYNTAX_TARGETS
844
+ ${SWIFT_PATH_TO_EARLYSWIFTSYNTAX_BUILD_DIR} /cmake/SwiftSyntaxTargets.cmake)
845
+ if (NOT EXISTS "${SWIFT_PATH_TO_EARLYSWIFTSYNTAX_TARGETS} " )
846
+ message (STATUS "Skipping Swift Swift parser integration due to missing early SwiftSyntax" )
847
+ else ()
848
+ set (SWIFT_SWIFT_PARSER TRUE )
849
+ include (${SWIFT_PATH_TO_EARLYSWIFTSYNTAX_TARGETS} )
850
+
851
+ if (SWIFT_HOST_VARIANT_SDK MATCHES "LINUX|ANDROID|OPENBSD|FREEBSD" AND NOT BOOTSTRAPPING_MODE STREQUAL "HOSTTOOLS" )
852
+ # Only "HOSTTOOLS" is supported in Linux when Swift parser integration is enabled.
853
+ message (WARNING "Force setting BOOTSTRAPPING=HOSTTOOLS because Swift parser integration is enabled" )
854
+ set (BOOTSTRAPPING_MODE "HOSTTOOLS" )
855
+ endif ()
856
+ endif ()
857
+ endif ()
858
+
841
859
if (BOOTSTRAPPING_MODE MATCHES "HOSTTOOLS|.*-WITH-HOSTLIBS" )
842
860
if (SWIFT_ENABLE_ARRAY_COW_CHECKS)
843
861
message (STATUS "array COW checks disabled when building the swift modules with host libraries" )
@@ -944,24 +962,6 @@ if(XCODE)
944
962
set (SWIFT_SDKS "OSX" )
945
963
endif ()
946
964
947
- # When we have the early SwiftSyntax build, we can include its parser.
948
- if (SWIFT_PATH_TO_EARLYSWIFTSYNTAX_BUILD_DIR)
949
- set (SWIFT_PATH_TO_EARLYSWIFTSYNTAX_TARGETS
950
- ${SWIFT_PATH_TO_EARLYSWIFTSYNTAX_BUILD_DIR} /cmake/SwiftSyntaxTargets.cmake)
951
- if (NOT EXISTS "${SWIFT_PATH_TO_EARLYSWIFTSYNTAX_TARGETS} " )
952
- message (STATUS "Skipping Swift Swift parser integration due to missing early SwiftSyntax" )
953
- else ()
954
- set (SWIFT_SWIFT_PARSER TRUE )
955
- include (${SWIFT_PATH_TO_EARLYSWIFTSYNTAX_TARGETS} )
956
-
957
- if (SWIFT_HOST_VARIANT_SDK MATCHES "LINUX|ANDROID|OPENBSD|FREEBSD" AND NOT BOOTSTRAPPING_MODE STREQUAL "HOSTTOOLS" )
958
- # Only "HOSTTOOLS" is supported in Linux when Swift parser integration is enabled.
959
- message (WARNING "Force setting BOOTSTRAPPING=HOSTTOOLS because Swift parser integration is enabled" )
960
- set (BOOTSTRAPPING_MODE "HOSTTOOLS" )
961
- endif ()
962
- endif ()
963
- endif ()
964
-
965
965
966
966
# FIXME: the parameters we specify in SWIFT_SDKS are lacking architecture specifics,
967
967
# so we need to hard-code it. For example, the SDK for Android is just 'ANDROID',
0 commit comments