Skip to content

Commit 1c187af

Browse files
authored
[Static SDK for Linux] Remove ICU from the build. (#422)
1 parent 38e4244 commit 1c187af

File tree

3 files changed

+4
-61
lines changed

3 files changed

+4
-61
lines changed

swift-ci/sdks/static-linux/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
products
2+
source

swift-ci/sdks/static-linux/scripts/build.sh

+1-46
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,6 @@ declare_package libxml2 "libxml2" "MIT" \
108108
declare_package curl "curl" "MIT" "https://curl.se"
109109
declare_package boringssl "boringssl" "OpenSSL AND ISC AND MIT" \
110110
"https://boringssl.googlesource.com/boringssl/"
111-
declare_package icu "icu" \
112-
"Unicode-3.0 AND ICU AND BSD-3-Clause AND NAIST-2003 AND MIT" \
113-
"https://icu.unicode.org"
114111
declare_package zlib "zlib" "Zlib" "https://zlib.net"
115112

116113
# Parse command line arguments
@@ -209,8 +206,6 @@ curl_version=${curl_desc#curl-}
209206

210207
boringssl_version=$(describe ${source_dir}/boringssl)
211208

212-
icu_version=$(describe ${source_dir}/icu)
213-
214209
zlib_version=$(versionFromTag ${source_dir}/zlib)
215210

216211
function quiet_pushd {
@@ -237,7 +232,6 @@ echo " - Musl FTS ${musl_fts_version}"
237232
echo " - libxml2 ${libxml2_version}"
238233
echo " - curl ${curl_version}"
239234
echo " - BoringSSL ${boringssl_version}"
240-
echo " - ICU ${icu_version}"
241235
echo " - zlib ${zlib_version}"
242236

243237
function run() {
@@ -274,14 +268,6 @@ else
274268
exit 1
275269
fi
276270

277-
header "Building ICU for host system"
278-
279-
mkdir -p ${build_dir}/icu
280-
quiet_pushd ${build_dir}/icu
281-
run "${source_dir}/icu/icu4c/source/configure"
282-
run make -j$parallel_jobs
283-
quiet_popd
284-
285271
for arch in $archs; do
286272

287273
# Fix architecture names
@@ -537,37 +523,6 @@ EOF
537523

538524
# -----------------------------------------------------------------------
539525

540-
header "Building ICU for $arch"
541-
542-
mkdir -p ${build_dir}/$arch/icu
543-
quiet_pushd ${build_dir}/$arch/icu
544-
run "${source_dir}/icu/icu4c/source/configure" \
545-
--host=$triple \
546-
--prefix=$sdk_root/usr \
547-
--libdir=$sdk_root/usr/lib \
548-
--with-cross-build=${build_dir}/icu \
549-
--disable-shared --enable-static \
550-
--enable-strict --disable-icuio \
551-
--disable-plugins --disable-dyload --disable-extras \
552-
--disable-samples --disable-layoutex --with-data-packaging=auto \
553-
LDFLAGS="$cxxldflags" \
554-
CC="$cc" \
555-
CXX="$cxx" \
556-
AS="$as" \
557-
AR="ar" RANLIB="ranlib"
558-
make -j$parallel_jobs install
559-
quiet_popd
560-
561-
# Install symlinks for the "swift" version
562-
mkdir -p ${sdk_root}/usr/lib/swift_static/linux-static
563-
quiet_pushd ${sdk_root}/usr/lib/swift_static/linux-static
564-
for library in data i18n test tu uc; do
565-
ln -sf ../../libicu${library}.a libicu${library}swift.a
566-
done
567-
quiet_popd
568-
569-
# -----------------------------------------------------------------------
570-
571526
header "Building libxml2 for $arch"
572527

573528
run cmake -G Ninja -S ${source_dir}/libxml2 -B ${build_dir}/$arch/libxml2 \
@@ -577,7 +532,7 @@ EOF
577532
-DCMAKE_INSTALL_PREFIX=$sdk_root/usr \
578533
-DBUILD_SHARED_LIBS=NO \
579534
-DLIBXML2_WITH_PYTHON=NO \
580-
-DLIBXML2_WITH_ICU=YES \
535+
-DLIBXML2_WITH_ICU=NO \
581536
-DLIBXML2_WITH_LZMA=NO
582537

583538
quiet_pushd ${build_dir}/$arch/libxml2

swift-ci/sdks/static-linux/scripts/fetch-source.sh

+1-15
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ usage: fetch-source.sh [--swift-scheme <scheme>|--swift-tag <tag>
5555
[--musl-version <version>] [--libxml2-version <version>]
5656
[--curl-version <version>]
5757
[--boringssl-version <version>]
58-
[--icu-version <version>] [--zlib-version <version>]
58+
[--zlib-version <version>]
5959
[--clone-with-ssh]
6060
[--source-dir <path>]
6161
@@ -76,7 +76,6 @@ SDK for Swift. Options are:
7676
--libxml2-version <version>
7777
--curl-version <version>
7878
--boringssl-version <version>
79-
--icu-version <version>
8079
--zlib-version <version>
8180
Select the versions of other dependencies.
8281
EOF
@@ -98,9 +97,6 @@ fi
9897
if [[ -z "${BORINGSSL_VERSION}" ]]; then
9998
BORINGSSL_VERSION=fips-20220613
10099
fi
101-
if [[ -z "${ICU_VERSION}" ]]; then
102-
ICU_VERSION=maint/maint-69
103-
fi
104100
if [[ -z "${ZLIB_VERSION}" ]]; then
105101
ZLIB_VERSION=1.3.1
106102
fi
@@ -122,8 +118,6 @@ while [ "$#" -gt 0 ]; do
122118
CURL_VERSION="$2"; shift ;;
123119
--boringssl-version)
124120
BORINGSSL_VERSION="$2"; shift ;;
125-
--icu-version)
126-
ICU_VERSION="$2"; shift ;;
127121
--zlib-version)
128122
ZLIB_VERSION="$2"; shift ;;
129123
--clone-with-ssh)
@@ -207,14 +201,6 @@ pushd boringssl >/dev/null 2>&1
207201
git checkout ${BORINGSSL_VERSION}
208202
popd >/dev/null 2>&1
209203

210-
# Fetch ICU
211-
header "Fetching ICU"
212-
213-
[[ -d icu ]] || git clone ${github}unicode-org/icu.git
214-
pushd icu >/dev/null 2>&1
215-
git checkout ${ICU_VERSION}
216-
popd >/dev/null 2>&1
217-
218204
# Fetch zlib
219205
header "Fetching zlib"
220206

0 commit comments

Comments
 (0)