Skip to content

Commit

Permalink
[Static SDK] Hacky workaround for swift-collections issue.
Browse files Browse the repository at this point in the history
Until the swift-collections fix filters through, make the build script
fix the problem by moving the installed library to the right place.
  • Loading branch information
al45tair committed Sep 18, 2024
1 parent 62c8581 commit cc604e6
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion swift-ci/sdks/static-linux/scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ done
# Work out the host architecture
case $(arch) in
arm64|aarch64)
host_arch=arm64
host_arch=aarch64
;;
amd64|x86_64)
host_arch=x86_64
Expand Down Expand Up @@ -769,6 +769,17 @@ EOF

# -----------------------------------------------------------------------

# HACK: Until swift-collections is fixed to install in the right place,
# we need to move it from the wrong location to the right location; check
# for it in the wrong location and move it if we find it.
static_dir=$sdk_root/usr/lib/swift_static
if [ -f $static_dir/linux/lib_FoundationCollections.a ]; then
mv $static_dir/linux/lib_FoundationCollections.a \
$static_dir/linux-static/lib_FoundationCollections.a
mv $static_dir/linux/_FoundationCollections.swiftModule \
$static_dir/linux-static/_FoundationCollections.swiftModule
fi

# We don't need the Linux libraries here, but turning off the Linux build
# causes trouble, so we're going to end up building them anyway.
rm -rf \
Expand Down

0 comments on commit cc604e6

Please sign in to comment.