Skip to content

Commit db50797

Browse files
committed
cmake: set default value of BOOTSTRAPPING_MODE to HOSTTOOLS
This was already the intention before, but it didn't work because cmake's `option` only works for boolean variables. Using `set` instead of `option` fixes that. This change also enables SwiftCompilerSources in lldb on Windows. #73322
1 parent b107a5e commit db50797

File tree

1 file changed

+2
-15
lines changed

1 file changed

+2
-15
lines changed

CMakeLists.txt

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -341,9 +341,8 @@ option(SWIFT_TOOLS_LD64_LTO_CODEGEN_ONLY_FOR_SUPPORTING_TARGETS
341341
debugging Swift)"
342342
FALSE)
343343

344-
option(BOOTSTRAPPING_MODE [=[
344+
set(BOOTSTRAPPING_MODE HOSTTOOLS CACHE STRING [=[
345345
How to build the swift compiler modules. Possible values are
346-
OFF: build without swift modules
347346
HOSTTOOLS: build with a pre-installed toolchain
348347
BOOTSTRAPPING: build with a 2-stage bootstrapping process
349348
BOOTSTRAPPING-WITH-HOSTLIBS: build with a 2-stage bootstrapping process,
@@ -352,7 +351,7 @@ How to build the swift compiler modules. Possible values are
352351
`SWIFT_NATIVE_SWIFT_TOOLS_PATH` (non-Darwin only)
353352
CROSSCOMPILE-WITH-HOSTLIBS: build with a bootstrapping-with-hostlibs compiled
354353
compiler, provided in `SWIFT_NATIVE_SWIFT_TOOLS_PATH`
355-
]=] OFF)
354+
]=])
356355

357356
option(BRIDGING_MODE [=[
358357
How swift-C++ bridging code is compiled:
@@ -736,18 +735,6 @@ option(SWIFT_ENABLE_BACKTRACING
736735
set(SWIFT_DARWIN_DEPLOYMENT_VERSION_MACCATALYST "14.5" CACHE STRING
737736
"Minimum deployment target version for macCatalyst")
738737

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-
751738
#
752739
# End of user-configurable options.
753740
#

0 commit comments

Comments
 (0)