File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -487,6 +487,14 @@ else()
487487 set (SWIFT_CROSS_COMPILING TRUE )
488488endif ()
489489
490+ # Check if a prebuilt clang path was passed in, as this variable will be
491+ # assigned if not, in SwiftSharedCMakeConfig.
492+ if ("${SWIFT_NATIVE_CLANG_TOOLS_PATH} " STREQUAL "" )
493+ set (SWIFT_PREBUILT_CLANG FALSE )
494+ else ()
495+ set (SWIFT_PREBUILT_CLANG TRUE )
496+ endif ()
497+
490498include (SwiftSharedCMakeConfig )
491499
492500# NOTE: We include this before SwiftComponents as it relies on some LLVM CMake
Original file line number Diff line number Diff line change @@ -1669,7 +1669,8 @@ function(add_swift_target_library name)
16691669 list (APPEND SWIFTLIB_SWIFT_COMPILE_FLAGS "-warn-implicit-overrides" )
16701670 endif ()
16711671
1672- if (NOT SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER AND NOT BUILD_STANDALONE)
1672+ if (NOT SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER AND NOT BUILD_STANDALONE AND
1673+ NOT SWIFT_PREBUILT_CLANG)
16731674 list (APPEND SWIFTLIB_DEPENDS clang)
16741675 endif ()
16751676
Original file line number Diff line number Diff line change @@ -111,7 +111,8 @@ endif()
111111# First extract the "version" used for Clang's resource directory.
112112string (REGEX MATCH "[0-9]+\\ .[0-9]+(\\ .[0-9]+)?" CLANG_VERSION
113113 "${LLVM_PACKAGE_VERSION} " )
114- if (NOT SWIFT_INCLUDE_TOOLS AND SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER)
114+ if (NOT SWIFT_INCLUDE_TOOLS AND
115+ (SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER OR SWIFT_PREBUILT_CLANG))
115116 if (SWIFT_COMPILER_IS_MSVC_LIKE)
116117 execute_process (COMMAND ${CMAKE_C_COMPILER } /clang:-print-resource-dir
117118 OUTPUT_VARIABLE clang_headers_location
Original file line number Diff line number Diff line change @@ -2283,10 +2283,9 @@ skip-build-cmark
22832283skip-build-benchmarks
22842284skip-test-cmark
22852285
2286- # This triggers the stdlib standalone build: Don 't build tools ( the compiler),
2287- # assume we are working with the host compiler.
2286+ # This triggers the stdlib standalone build: don 't build the native tools from
2287+ # scratch, ie the compiler.
22882288build-swift-tools =0
2289- build-runtime-with-host-compiler =1
22902289
22912290# Then set the paths to our native tools. If compiling against a toolchain,
22922291# these should all be the ./usr/bin directory.
Original file line number Diff line number Diff line change @@ -1485,13 +1485,6 @@ for host in "${ALL_HOSTS[@]}"; do
14851485 fi
14861486 fi
14871487
1488- if [[ " ${NATIVE_CLANG_TOOLS_PATH} " ]] ; then
1489- common_cmake_options_host+=(
1490- -DCMAKE_C_COMPILER=" ${NATIVE_CLANG_TOOLS_PATH} /clang"
1491- -DCMAKE_CXX_COMPILER=" ${NATIVE_CLANG_TOOLS_PATH} /clang++"
1492- )
1493- fi
1494-
14951488 llvm_cmake_options=(
14961489 " ${llvm_cmake_options[@]} "
14971490 -DCMAKE_INSTALL_PREFIX:PATH=" $( get_host_install_prefix ${host} ) "
You can’t perform that action at this time.
0 commit comments