Skip to content

Commit

Permalink
build: only search for ICU if building the stdlib/sdk overlay
Browse files Browse the repository at this point in the history
When building just the tools, the ICU search is not needed as the compiler and
the tools do not use ICU themselves.  This enables cross-compiling just the
swift compiler.
  • Loading branch information
compnerd committed Sep 5, 2018
1 parent 6f3b618 commit 5ba9133
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -866,11 +866,13 @@ endfunction()
# package lookup. Otherwise, rely on the paths specified by the user. These
# need to be defined when cross-compiling.
if(NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin")
swift_icu_variables_set("${SWIFT_HOST_VARIANT_SDK_default}"
"${SWIFT_HOST_VARIANT_ARCH_default}"
ICU_CONFIGURED)
if("${SWIFT_PATH_TO_LIBICU_BUILD}" STREQUAL "" AND NOT ${ICU_CONFIGURED})
find_package(ICU REQUIRED COMPONENTS uc i18n)
if(SWIFT_BUILD_STDLIB OR SWIFT_BUILD_SDK_OVERLAY)
swift_icu_variables_set("${SWIFT_HOST_VARIANT_SDK_default}"
"${SWIFT_HOST_VARIANT_ARCH_default}"
ICU_CONFIGURED)
if("${SWIFT_PATH_TO_LIBICU_BUILD}" STREQUAL "" AND NOT ${ICU_CONFIGURED})
find_package(ICU REQUIRED COMPONENTS uc i18n)
endif()
endif()
endif()

Expand Down

0 comments on commit 5ba9133

Please sign in to comment.