Skip to content

Commit 1bbce7c

Browse files
committed
[CMake] Better dependency checking
1 parent 3ea3769 commit 1bbce7c

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,8 @@ message(STATUS "C Compiler (${CMAKE_C_COMPILER}) Version: ${CMAKE_C_COMPILER_VER
509509
message(STATUS "C++ Compiler (${CMAKE_CXX_COMPILER}) Version: ${CMAKE_CXX_COMPILER_VERSION}")
510510
if (CMAKE_Swift_COMPILER)
511511
message(STATUS "Swift Compiler (${CMAKE_Swift_COMPILER}) Version: ${CMAKE_Swift_COMPILER_VERSION}")
512+
elseif (SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER)
513+
message(FATAL_ERROR "Swift Compiler not found and SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER is set")
512514
else()
513515
message(STATUS "Swift Compiler (None).")
514516
endif()

stdlib/cmake/modules/SwiftSource.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,7 @@ function(_compile_swift_files
643643
endif()
644644

645645
set(swift_compiler_tool_dep)
646-
if(SWIFT_INCLUDE_TOOLS)
646+
if(SWIFT_INCLUDE_TOOLS AND NOT SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER)
647647
# Depend on the binary itself, in addition to the symlink.
648648
set(swift_compiler_tool_dep "swift-frontend")
649649
endif()

0 commit comments

Comments
 (0)