Skip to content

Commit 66b8c39

Browse files
[static sdk] build with sdk triple
1 parent a3aac61 commit 66b8c39

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/scripts/install-and-build-with-sdk.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -843,9 +843,17 @@ build() {
843843
if [[ "$INSTALL_STATIC_LINUX" == true ]]; then
844844
log "Running Swift build with Static Linux Swift SDK"
845845

846-
local sdk_name="${STATIC_LINUX_SDK_FILENAME%.artifactbundle.tar.gz}"
846+
local arch
847+
local sdk_triple
848+
arch=$(uname -m)
849+
if [[ "$arch" == "aarch64" ]]; then
850+
sdk_triple="aarch64-swift-linux-musl"
851+
else
852+
sdk_triple="x86_64-swift-linux-musl"
853+
fi
854+
847855
alias swift='$SWIFT_EXECUTABLE_FOR_STATIC_LINUX_SDK'
848-
local build_command="$SWIFT_BUILD_COMMAND --swift-sdk $sdk_name"
856+
local build_command="$SWIFT_BUILD_COMMAND --swift-sdk $sdk_triple"
849857
if [[ -n "$SWIFT_BUILD_FLAGS" ]]; then
850858
build_command="$build_command $SWIFT_BUILD_FLAGS"
851859
fi

0 commit comments

Comments
 (0)