@@ -736,6 +736,18 @@ option(SWIFT_ENABLE_BACKTRACING
736736set (SWIFT_DARWIN_DEPLOYMENT_VERSION_MACCATALYST "14.5" CACHE STRING
737737 "Minimum deployment target version for macCatalyst" )
738738
739+ # A tempoarary hack: force enabling HOSTTOOLS mode on Windows.
740+ # Right now, SwiftCompilerSources cannot be enabled for lldb because on Windows
741+ # swift and lldb are built in a unified build and there is a missing dependency
742+ # on swiftrt.
743+ # Swift and lldb are configured with the same cmake invocation and therefore
744+ # enabling bootstrapping for swift and disabling it for lldb only works by
745+ # hardcoding the bootstrapping mode in the cmake file.
746+ # https://github.com/apple/swift/issues/73322
747+ if (CMAKE_SYSTEM_NAME STREQUAL "Windows" )
748+ set (BOOTSTRAPPING_MODE "HOSTTOOLS" )
749+ endif ()
750+
739751#
740752# End of user-configurable options.
741753#
@@ -904,6 +916,10 @@ if("${SWIFT_NATIVE_SWIFT_TOOLS_PATH}" STREQUAL "")
904916 # This is the normal case. We are not cross-compiling.
905917 set (SWIFT_NATIVE_SWIFT_TOOLS_PATH "${SWIFT_RUNTIME_OUTPUT_INTDIR} " )
906918 set (SWIFT_EXEC_FOR_SWIFT_MODULES "${CMAKE_Swift_COMPILER} " )
919+ if (NOT SWIFT_EXEC_FOR_SWIFT_MODULES)
920+ message (WARNING "BOOSTRAPPING set to OFF because no Swift compiler is defined" )
921+ set (BOOTSTRAPPING_MODE "OFF" )
922+ endif ()
907923elseif (BOOTSTRAPPING_MODE MATCHES "BOOTSTRAPPING.*" )
908924 # If cross-compiling, we don't have to bootstrap. We can just use the previously
909925 # built native swiftc to build the swift compiler modules.
0 commit comments