Skip to content

[Static SDK for Linux] Remove ICU from the build. #422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions swift-ci/sdks/static-linux/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
products
source
47 changes: 1 addition & 46 deletions swift-ci/sdks/static-linux/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 {
Expand All @@ -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() {
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 \
Expand All @@ -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
Expand Down
16 changes: 1 addition & 15 deletions swift-ci/sdks/static-linux/scripts/fetch-source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ usage: fetch-source.sh [--swift-scheme <scheme>|--swift-tag <tag>
[--musl-version <version>] [--libxml2-version <version>]
[--curl-version <version>]
[--boringssl-version <version>]
[--icu-version <version>] [--zlib-version <version>]
[--zlib-version <version>]
[--clone-with-ssh]
[--source-dir <path>]

Expand All @@ -76,7 +76,6 @@ SDK for Swift. Options are:
--libxml2-version <version>
--curl-version <version>
--boringssl-version <version>
--icu-version <version>
--zlib-version <version>
Select the versions of other dependencies.
EOF
Expand All @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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"

Expand Down
Loading