From 1c187af5052cbc582596c01de93e2d8f66187fd7 Mon Sep 17 00:00:00 2001 From: Alastair Houghton Date: Fri, 4 Oct 2024 15:33:29 +0100 Subject: [PATCH] [Static SDK for Linux] Remove ICU from the build. (#422) --- swift-ci/sdks/static-linux/.gitignore | 2 + swift-ci/sdks/static-linux/scripts/build.sh | 47 +------------------ .../sdks/static-linux/scripts/fetch-source.sh | 16 +------ 3 files changed, 4 insertions(+), 61 deletions(-) create mode 100644 swift-ci/sdks/static-linux/.gitignore diff --git a/swift-ci/sdks/static-linux/.gitignore b/swift-ci/sdks/static-linux/.gitignore new file mode 100644 index 00000000..1bb65b13 --- /dev/null +++ b/swift-ci/sdks/static-linux/.gitignore @@ -0,0 +1,2 @@ +products +source diff --git a/swift-ci/sdks/static-linux/scripts/build.sh b/swift-ci/sdks/static-linux/scripts/build.sh index 83f5c5ae..65b818b6 100755 --- a/swift-ci/sdks/static-linux/scripts/build.sh +++ b/swift-ci/sdks/static-linux/scripts/build.sh @@ -108,9 +108,6 @@ declare_package libxml2 "libxml2" "MIT" \ declare_package curl "curl" "MIT" "https://curl.se" declare_package boringssl "boringssl" "OpenSSL AND ISC AND MIT" \ "https://boringssl.googlesource.com/boringssl/" -declare_package icu "icu" \ - "Unicode-3.0 AND ICU AND BSD-3-Clause AND NAIST-2003 AND MIT" \ - "https://icu.unicode.org" declare_package zlib "zlib" "Zlib" "https://zlib.net" # Parse command line arguments @@ -209,8 +206,6 @@ curl_version=${curl_desc#curl-} boringssl_version=$(describe ${source_dir}/boringssl) -icu_version=$(describe ${source_dir}/icu) - zlib_version=$(versionFromTag ${source_dir}/zlib) function quiet_pushd { @@ -237,7 +232,6 @@ echo " - Musl FTS ${musl_fts_version}" echo " - libxml2 ${libxml2_version}" echo " - curl ${curl_version}" echo " - BoringSSL ${boringssl_version}" -echo " - ICU ${icu_version}" echo " - zlib ${zlib_version}" function run() { @@ -274,14 +268,6 @@ else exit 1 fi -header "Building ICU for host system" - -mkdir -p ${build_dir}/icu -quiet_pushd ${build_dir}/icu -run "${source_dir}/icu/icu4c/source/configure" -run make -j$parallel_jobs -quiet_popd - for arch in $archs; do # Fix architecture names @@ -537,37 +523,6 @@ EOF # ----------------------------------------------------------------------- - header "Building ICU for $arch" - - mkdir -p ${build_dir}/$arch/icu - quiet_pushd ${build_dir}/$arch/icu - run "${source_dir}/icu/icu4c/source/configure" \ - --host=$triple \ - --prefix=$sdk_root/usr \ - --libdir=$sdk_root/usr/lib \ - --with-cross-build=${build_dir}/icu \ - --disable-shared --enable-static \ - --enable-strict --disable-icuio \ - --disable-plugins --disable-dyload --disable-extras \ - --disable-samples --disable-layoutex --with-data-packaging=auto \ - LDFLAGS="$cxxldflags" \ - CC="$cc" \ - CXX="$cxx" \ - AS="$as" \ - AR="ar" RANLIB="ranlib" - make -j$parallel_jobs install - quiet_popd - - # Install symlinks for the "swift" version - mkdir -p ${sdk_root}/usr/lib/swift_static/linux-static - quiet_pushd ${sdk_root}/usr/lib/swift_static/linux-static - for library in data i18n test tu uc; do - ln -sf ../../libicu${library}.a libicu${library}swift.a - done - quiet_popd - - # ----------------------------------------------------------------------- - header "Building libxml2 for $arch" run cmake -G Ninja -S ${source_dir}/libxml2 -B ${build_dir}/$arch/libxml2 \ @@ -577,7 +532,7 @@ EOF -DCMAKE_INSTALL_PREFIX=$sdk_root/usr \ -DBUILD_SHARED_LIBS=NO \ -DLIBXML2_WITH_PYTHON=NO \ - -DLIBXML2_WITH_ICU=YES \ + -DLIBXML2_WITH_ICU=NO \ -DLIBXML2_WITH_LZMA=NO quiet_pushd ${build_dir}/$arch/libxml2 diff --git a/swift-ci/sdks/static-linux/scripts/fetch-source.sh b/swift-ci/sdks/static-linux/scripts/fetch-source.sh index 7eb5827a..3aa8121f 100755 --- a/swift-ci/sdks/static-linux/scripts/fetch-source.sh +++ b/swift-ci/sdks/static-linux/scripts/fetch-source.sh @@ -55,7 +55,7 @@ usage: fetch-source.sh [--swift-scheme |--swift-tag [--musl-version ] [--libxml2-version ] [--curl-version ] [--boringssl-version ] - [--icu-version ] [--zlib-version ] + [--zlib-version ] [--clone-with-ssh] [--source-dir ] @@ -76,7 +76,6 @@ SDK for Swift. Options are: --libxml2-version --curl-version --boringssl-version - --icu-version --zlib-version Select the versions of other dependencies. EOF @@ -98,9 +97,6 @@ fi if [[ -z "${BORINGSSL_VERSION}" ]]; then BORINGSSL_VERSION=fips-20220613 fi -if [[ -z "${ICU_VERSION}" ]]; then - ICU_VERSION=maint/maint-69 -fi if [[ -z "${ZLIB_VERSION}" ]]; then ZLIB_VERSION=1.3.1 fi @@ -122,8 +118,6 @@ while [ "$#" -gt 0 ]; do CURL_VERSION="$2"; shift ;; --boringssl-version) BORINGSSL_VERSION="$2"; shift ;; - --icu-version) - ICU_VERSION="$2"; shift ;; --zlib-version) ZLIB_VERSION="$2"; shift ;; --clone-with-ssh) @@ -207,14 +201,6 @@ pushd boringssl >/dev/null 2>&1 git checkout ${BORINGSSL_VERSION} popd >/dev/null 2>&1 -# Fetch ICU -header "Fetching ICU" - -[[ -d icu ]] || git clone ${github}unicode-org/icu.git -pushd icu >/dev/null 2>&1 -git checkout ${ICU_VERSION} -popd >/dev/null 2>&1 - # Fetch zlib header "Fetching zlib"