Skip to content

Commit 934823a

Browse files
committed
[build] Replace SWIFT_CROSS_COMPILING with SWIFT_PREBUILT_CLANG
1 parent c74884c commit 934823a

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -481,12 +481,6 @@ if(SWIFT_PATH_TO_CMARK_BUILD)
481481
endif()
482482
message(STATUS "")
483483

484-
if("${SWIFT_NATIVE_LLVM_TOOLS_PATH}" STREQUAL "")
485-
set(SWIFT_CROSS_COMPILING FALSE)
486-
else()
487-
set(SWIFT_CROSS_COMPILING TRUE)
488-
endif()
489-
490484
# Check if a prebuilt clang path was passed in, as this variable will be
491485
# assigned if not, in SwiftSharedCMakeConfig.
492486
if("${SWIFT_NATIVE_CLANG_TOOLS_PATH}" STREQUAL "")

cmake/modules/SwiftSharedCMakeConfig.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ macro(swift_common_standalone_build_config_llvm product)
5858
fix_imported_targets_for_xcode("${LLVM_EXPORTED_TARGETS}")
5959
endif()
6060

61-
if(NOT CMAKE_CROSSCOMPILING AND NOT SWIFT_CROSS_COMPILING)
61+
if(NOT CMAKE_CROSSCOMPILING)
6262
set(${product}_NATIVE_LLVM_TOOLS_PATH "${LLVM_TOOLS_BINARY_DIR}")
6363
endif()
6464

@@ -159,7 +159,7 @@ endmacro()
159159
macro(swift_common_standalone_build_config_clang product)
160160
find_package(Clang CONFIG REQUIRED NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH)
161161

162-
if (NOT CMAKE_CROSSCOMPILING)
162+
if (NOT CMAKE_CROSSCOMPILING AND NOT SWIFT_PREBUILT_CLANG)
163163
set(${product}_NATIVE_CLANG_TOOLS_PATH "${LLVM_TOOLS_BINARY_DIR}")
164164
endif()
165165

0 commit comments

Comments
 (0)