diff --git a/CMakeLists.txt b/CMakeLists.txt index dab91f2a69f05..636ac6632e6f8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -305,23 +305,6 @@ set(SWIFT_ANDROID_NDK_CLANG_VERSION "12.0.8" CACHE STRING set(SWIFT_ANDROID_DEPLOY_DEVICE_PATH "" CACHE STRING "Path on an Android device where build products will be pushed. These are used when running the test suite against the device") -# -# User-configurable ICU specific options for Android, FreeBSD, Linux, Haiku, and WASI. -# - -foreach(sdk ANDROID;FREEBSD;LINUX;WINDOWS;HAIKU;WASI) - foreach(arch aarch64;armv6;armv7;i686;powerpc64;powerpc64le;s390x;wasm32;x86_64) - set(SWIFT_${sdk}_${arch}_ICU_UC "" CACHE STRING - "Path to a directory containing the icuuc library for ${sdk}") - set(SWIFT_${sdk}_${arch}_ICU_UC_INCLUDE "" CACHE STRING - "Path to a directory containing headers for icuuc for ${sdk}") - set(SWIFT_${sdk}_${arch}_ICU_I18N "" CACHE STRING - "Path to a directory containing the icui18n library for ${sdk}") - set(SWIFT_${sdk}_${arch}_ICU_I18N_INCLUDE "" CACHE STRING - "Path to a directory containing headers icui18n for ${sdk}") - endforeach() -endforeach() - # # User-configurable Darwin-specific options. # diff --git a/docs/WindowsBuild.md b/docs/WindowsBuild.md index 300c377e3a0d6..4506701290daf 100644 --- a/docs/WindowsBuild.md +++ b/docs/WindowsBuild.md @@ -92,7 +92,7 @@ structure should resemble: β”• usr/... ``` -Note that only ICU is required for building the toolchain, and SQLite is only +Note that ICU is only required for building Foundation, and SQLite is only needed for building llbuild and onwards. The ICU project provides binaries, alternatively, see the ICU project for details on building ICU from source. @@ -134,10 +134,6 @@ cmake -B "S:\b\1" ^ -D LLVM_EXTERNAL_CMARK_SOURCE_DIR=S:\cmark ^ -D LLVM_EXTERNAL_SWIFT_SOURCE_DIR=S:\swift ^ -D SWIFT_PATH_TO_LIBDISPATCH_SOURCE=S:\swift-corelibs-libdispatch ^ - -D SWIFT_WINDOWS_x86_64_ICU_I18N_INCLUDE=S:\Library\icu-67\usr\include ^ - -D SWIFT_WINDOWS_x86_64_ICU_I18N=S:\Library\icu-67\usr\lib\icuin67.lib ^ - -D SWIFT_WINDOWS_x86_64_ICU_UC_INCLUDE=S:\Library\icu-67\usr\include ^ - -D SWIFT_WINDOWS_x86_64_ICU_UC=S:\Library\icu-67\usr\lib\icuuc67.lib ^ -G Ninja ^ -S S:\llvm-project\llvm diff --git a/docs/WindowsCrossCompile.md b/docs/WindowsCrossCompile.md index 21550082da520..78757b0e30d4b 100644 --- a/docs/WindowsCrossCompile.md +++ b/docs/WindowsCrossCompile.md @@ -30,7 +30,6 @@ the `build-script` invocation to achieve this. You will need to expand out the path where `llvm-ar` and `llvm-ranlib` are built. These are needed to correctly build the static libraries. Note that cross-compiling will require the use of `lld`. Ensure that `lld-link.exe` is available to clang via your path. -Additionally, the ICU headers and libraries need to be provided for the build. #### macOS @@ -38,11 +37,7 @@ Additionally, the ICU headers and libraries need to be provided for the build. --extra-cmake-options=-DSWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER=FALSE,\ -DCMAKE_AR=,\ -DCMAKE_RANLIB=,\ --DSWIFT_SDKS='OSX;WINDOWS',\ --DSWIFT_WINDOWS_x86_64_ICU_I18N_INCLUDE=,\ --DSWIFT_WINDOWS_x86_64_ICU_UC_INCLUDE=,\ --DSWIFT_WINDOWS_x86_64_ICU_I18N=,\ --DSWIFT_WINDOWS_x86_64_ICU_UC= +-DSWIFT_SDKS='OSX;WINDOWS' ``` #### Linux diff --git a/stdlib/cmake/modules/AddSwiftStdlib.cmake b/stdlib/cmake/modules/AddSwiftStdlib.cmake index 381ec5aa06f12..d4f5d7b8a434e 100644 --- a/stdlib/cmake/modules/AddSwiftStdlib.cmake +++ b/stdlib/cmake/modules/AddSwiftStdlib.cmake @@ -1152,17 +1152,9 @@ function(add_swift_target_library_single target name) target_link_libraries("${target}" INTERFACE ${SWIFTLIB_SINGLE_LINK_LIBRARIES}) endif() - # Don't add the icucore target. - set(SWIFTLIB_SINGLE_LINK_LIBRARIES_WITHOUT_ICU) - foreach(item ${SWIFTLIB_SINGLE_LINK_LIBRARIES}) - if(NOT "${item}" STREQUAL "icucore") - list(APPEND SWIFTLIB_SINGLE_LINK_LIBRARIES_WITHOUT_ICU "${item}") - endif() - endforeach() - if(target_static) _list_add_string_suffix( - "${SWIFTLIB_SINGLE_LINK_LIBRARIES_WITHOUT_ICU}" + "${SWIFTLIB_SINGLE_LINK_LIBRARIES}" "-static" target_static_depends) # FIXME: should this be target_link_libraries? diff --git a/test/stdlib/Character.swift b/test/stdlib/Character.swift index e324c6ff806e1..8c568c6eaf7ea 100644 --- a/test/stdlib/Character.swift +++ b/test/stdlib/Character.swift @@ -84,16 +84,12 @@ var testCharacters = [ "\u{0061}\u{0300}\u{0300}\u{0300}\u{0300}", // UTF-8: 9 bytes ] -// Only run it on ObjC platforms. Supported Linux versions do not have a -// recent enough ICU -#if _runtime(_ObjC) testCharacters += [ "\u{0061}\u{0300}\u{0300}\u{0300}\u{0300}\u{0300}", // UTF-8: 11 bytes "\u{0061}\u{0300}\u{0300}\u{0300}\u{0300}\u{0300}\u{0300}", // UTF-8: 13 bytes "\u{0061}\u{0300}\u{0300}\u{0300}\u{0300}\u{0300}\u{0300}\u{0300}", // UTF-8: 15 bytes "\u{0061}\u{0300}\u{0300}\u{0300}\u{0300}\u{0300}\u{0300}\u{0300}\u{0300}", // UTF-8: 17 bytes ] -#endif testCharacters += [ // U+00A9 COPYRIGHT SIGN @@ -105,8 +101,6 @@ testCharacters += [ "\u{00a9}\u{0300}\u{0300}\u{0300}\u{0300}", // UTF-8: 10 bytes ] -// Only run it on recent enough versions of ICU -#if _runtime(_ObjC) if #available(iOS 11.0, macOS 10.13, tvOS 11.0, watchOS 4.0, *) { testCharacters += [ "\u{00a9}\u{0300}\u{0300}\u{0300}\u{0300}\u{0300}", // UTF-8: 12 bytes @@ -117,7 +111,6 @@ if #available(iOS 11.0, macOS 10.13, tvOS 11.0, watchOS 4.0, *) { "πŸ‘©β€πŸ‘©β€πŸ‘¦β€πŸ‘¦", // UTF-8: 25 bytes ] } -#endif func randomGraphemeCluster(_ minSize: Int, _ maxSize: Int) -> String { let n = Int.random(in: (minSize + 1) ..< maxSize) @@ -224,9 +217,6 @@ CharacterTests.test("CR-LF") { } CharacterTests.test("Unicode 9 grapheme breaking") { - // Only run it on ObjC platforms. Supported Linux versions do not have a - // recent enough ICU for Unicode 9 support. -#if _runtime(_ObjC) // Check for Unicode 9 or later guard #available(iOS 10.0, macOS 10.12, *) else { return } @@ -241,7 +231,6 @@ CharacterTests.test("Unicode 9 grapheme breaking") { let skinTone = "πŸ‘‹πŸ‘‹πŸ»πŸ‘‹πŸΌπŸ‘‹πŸ½πŸ‘‹πŸΎπŸ‘‹πŸΏ" expectEqual(6, skinTone.count) expectEqual(skinTone.reversed().count, skinTone.count) -#endif } /// Test that a given `String` can be transformed into a `Character` and back diff --git a/test/stdlib/CharacterProperties.swift b/test/stdlib/CharacterProperties.swift index 930f1da81c014..35a878e21979e 100644 --- a/test/stdlib/CharacterProperties.swift +++ b/test/stdlib/CharacterProperties.swift @@ -143,12 +143,7 @@ CharacterPropertiesTests.test("Casing") { expectEqual("SS", Character("ß").uppercased()) -// Some versions of ICU on Linux (62.1) have a bug producing the wrong value -// when lowercasing "ẞ". Darwin platforms never shipped this version, so -// conditionally test based on platform. -#if canImport(Darwin) expectEqual("ß", Character("ẞ").lowercased()) -#endif expectEqual("ΠΈ", Character("И").lowercased()) expectEqual("И", Character("ΠΈ").uppercased()) diff --git a/utils/build-presets.ini b/utils/build-presets.ini index 7f5a7cdc6a647..bd0dd2cba3d11 100644 --- a/utils/build-presets.ini +++ b/utils/build-presets.ini @@ -921,7 +921,6 @@ test-optimized lit-args=-v --time-tests build-ninja -libicu libcxx android @@ -942,7 +941,6 @@ host-test install-prefix=/usr install-llvm install-swift -install-libicu install-libcxx skip-test-linux diff --git a/utils/build-script-impl b/utils/build-script-impl index 2c4ee39de22ee..65aa900ed2003 100755 --- a/utils/build-script-impl +++ b/utils/build-script-impl @@ -2064,19 +2064,6 @@ for host in "${ALL_HOSTS[@]}"; do -DSWIFT_PATH_TO_LIBDISPATCH_STATIC_BUILD:PATH="$(build_directory ${host} libdispatch_static)" ) - if [[ ! "${SKIP_BUILD_LIBICU}" ]] ; then - LIBICU_BUILD_DIR="$(build_directory ${host} libicu)" - ICU_TMPINSTALL=${LIBICU_BUILD_DIR}/tmp_install - cmake_options=( - "${cmake_options[@]}" - -DSWIFT_PATH_TO_LIBICU_SOURCE:PATH="${LIBICU_SOURCE_DIR}" - -DSWIFT_PATH_TO_LIBICU_BUILD:PATH="${LIBICU_BUILD_DIR}" - -DSWIFT_${SWIFT_HOST_VARIANT_SDK}_${SWIFT_HOST_VARIANT_ARCH}_ICU_UC_INCLUDE:STRING="${ICU_TMPINSTALL}/include" - -DSWIFT_${SWIFT_HOST_VARIANT_SDK}_${SWIFT_HOST_VARIANT_ARCH}_ICU_I18N_INCLUDE:STRING="${ICU_TMPINSTALL}/include" - -DSWIFT_${SWIFT_HOST_VARIANT_SDK}_${SWIFT_HOST_VARIANT_ARCH}_ICU_STATICLIB:BOOL=TRUE - ) - fi - if [[ "${SWIFT_SDKS}" ]] ; then cmake_options=( "${cmake_options[@]}" diff --git a/utils/build-windows-toolchain.bat b/utils/build-windows-toolchain.bat index 1b03ee35c58fc..18c32b3f310a4 100644 --- a/utils/build-windows-toolchain.bat +++ b/utils/build-windows-toolchain.bat @@ -202,10 +202,6 @@ cmake ^ -D PYTHON_EXECUTABLE=%PYTHON_HOME%\python.exe ^ -D SWIFT_PATH_TO_LIBDISPATCH_SOURCE="%SourceRoot%\swift-corelibs-libdispatch" ^ -D EXPERIMENTAL_STRING_PROCESSING_SOURCE_DIR=%SourceRoot%\swift-experimental-string-processing ^ - -D SWIFT_WINDOWS_x86_64_ICU_UC_INCLUDE="%BuildRoot%\Library\icu-67.1\include\unicode" ^ - -D SWIFT_WINDOWS_x86_64_ICU_UC="%BuildRoot%\Library\icu-67.1\lib64\icuuc.lib" ^ - -D SWIFT_WINDOWS_x86_64_ICU_I18N_INCLUDE="%BuildRoot%\Library\icu-67.1\include" ^ - -D SWIFT_WINDOWS_x86_64_ICU_I18N="%BuildRoot%\Library\icu-67.1\lib64\icuin.lib" ^ -G Ninja ^ -S llvm-project\llvm || (exit /b) @@ -233,10 +229,6 @@ cmake ^ -D SWIFT_NATIVE_SWIFT_TOOLS_PATH=%BuildRoot%\1\bin ^ -D SWIFT_PATH_TO_LIBDISPATCH_SOURCE=%SourceRoot%\swift-corelibs-libdispatch ^ -D EXPERIMENTAL_STRING_PROCESSING_SOURCE_DIR=%SourceRoot%\swift-experimental-string-processing ^ - -D SWIFT_WINDOWS_x86_64_ICU_UC_INCLUDE="%BuildRoot%\Library\icu-67.1\include\unicode" ^ - -D SWIFT_WINDOWS_x86_64_ICU_UC="%BuildRoot%\Library\icu-67.1\lib64\icuuc.lib" ^ - -D SWIFT_WINDOWS_x86_64_ICU_I18N_INCLUDE="%BuildRoot%\Library\icu-67.1\include" ^ - -D SWIFT_WINDOWS_x86_64_ICU_I18N="%BuildRoot%\Library\icu-67.1\lib64\icuin.lib" ^ -D SWIFT_ENABLE_EXPERIMENTAL_CONCURRENCY=YES ^ -D SWIFT_ENABLE_EXPERIMENTAL_DISTRIBUTED=YES ^ diff --git a/utils/build-windows.bat b/utils/build-windows.bat index bc5981bd4befc..fc82212772c33 100644 --- a/utils/build-windows.bat +++ b/utils/build-windows.bat @@ -257,10 +257,6 @@ cmake^ -DLLVM_DIR:PATH=%build_root%\llvm\lib\cmake\llvm^ -DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON^ -DSWIFT_INCLUDE_DOCS:BOOL=NO^ - -DSWIFT_WINDOWS_x86_64_ICU_UC_INCLUDE:PATH=%source_root%\icu-%icu_version%\include\unicode^ - -DSWIFT_WINDOWS_x86_64_ICU_UC:PATH=%source_root%\icu-%icu_version%\lib64\icuuc.lib^ - -DSWIFT_WINDOWS_x86_64_ICU_I18N_INCLUDE:PATH=%source_root%\icu-%icu_version%\include^ - -DSWIFT_WINDOWS_x86_64_ICU_I18N:PATH=%source_root%\icu-%icu_version%\lib64\icuin.lib^ -DSWIFT_BUILD_DYNAMIC_STDLIB:BOOL=YES^ -DSWIFT_BUILD_DYNAMIC_SDK_OVERLAY:BOOL=YES^ -DSWIFT_BUILD_STATIC_STDLIB:BOOL=NO^ diff --git a/utils/swift_build_support/swift_build_support/products/libdispatch.py b/utils/swift_build_support/swift_build_support/products/libdispatch.py index d5ff58a826ad2..e4970a335a3e8 100644 --- a/utils/swift_build_support/swift_build_support/products/libdispatch.py +++ b/utils/swift_build_support/swift_build_support/products/libdispatch.py @@ -12,7 +12,6 @@ from . import cmark from . import libcxx -from . import libicu from . import llvm from . import product from . import swift @@ -52,5 +51,4 @@ def get_dependencies(cls): return [cmark.CMark, llvm.LLVM, libcxx.LibCXX, - libicu.LibICU, swift.Swift] diff --git a/utils/swift_build_support/swift_build_support/products/swift.py b/utils/swift_build_support/swift_build_support/products/swift.py index 159a28a9973e1..18297c0788116 100644 --- a/utils/swift_build_support/swift_build_support/products/swift.py +++ b/utils/swift_build_support/swift_build_support/products/swift.py @@ -13,7 +13,6 @@ from . import cmark from . import earlyswiftdriver from . import libcxx -from . import libicu from . import llvm from . import product from ..cmake import CMakeOptions @@ -183,5 +182,4 @@ def get_dependencies(cls): return [cmark.CMark, earlyswiftdriver.EarlySwiftDriver, llvm.LLVM, - libcxx.LibCXX, - libicu.LibICU] + libcxx.LibCXX]