Skip to content

Commit

Permalink
[Static SDK] Hacky workaround for swift-collections issue. (#418)
Browse files Browse the repository at this point in the history
  • Loading branch information
al45tair authored Sep 19, 2024
1 parent 62c8581 commit e9dc4aa
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 e9dc4aa

Please sign in to comment.