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