Skip to content

Commit 40841b3

Browse files
committed
[CMake] Fatal error when bootstrapping is not "hosttools"
and Swift parser integration is enabled. If swift parser integration is enabled, SwiftSyntax libraries are always built with host tools. Other SwiftCompilerSources modules must use the same runtime with parser libraries.
1 parent 2a2787b commit 40841b3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -953,6 +953,10 @@ if(SWIFT_PATH_TO_EARLYSWIFTSYNTAX_BUILD_DIR)
953953
else()
954954
set(SWIFT_SWIFT_PARSER TRUE)
955955
include(${SWIFT_PATH_TO_EARLYSWIFTSYNTAX_TARGETS})
956+
957+
if(SWIFT_HOST_VARIANT_SDK STREQUAL "LINUX" AND NOT BOOTSTRAPPING_MODE STREQUAL "HOSTTOOLS")
958+
message(FATAL_ERROR "Only BOOTSTRAPPING=HOSTTOOLS is supported in Linux when Swift parser integration is enabled")
959+
endif()
956960
endif()
957961
endif()
958962

0 commit comments

Comments
 (0)