Skip to content

Commit 0eabab7

Browse files
Only generate SDKSettings.json for Swift 5.9 and 6.0
1 parent 93ff0b5 commit 0eabab7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

build-linux-cross-sdk.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,14 +51,16 @@ echo "Copying Swift install into $TARGET_SDK_DIR..."
5151
cp -rf $INSTALL_DESTDIR/* $TARGET_SDK_DIR
5252

5353
# Annoying but helpful for Swift versions < 6.1
54-
echo "Creating SDKSettings.json to silence cross-compilation warnings"
55-
cat <<EOT > $TARGET_SDK_DIR/SDKSettings.json
54+
if [[ $SWIFT_VERSION == *"5."* ]] || [[ $SWIFT_VERSION == *"6.0"* ]]; then
55+
echo "Creating SDKSettings.json to silence cross-compilation warnings"
56+
cat <<EOT > $TARGET_SDK_DIR/SDKSettings.json
5657
{
5758
"SupportedTargets": {},
5859
"Version": "0.0.1",
5960
"CanonicalName": "linux"
6061
}
6162
EOT
63+
fi
6264

6365
# Create destination.json file
6466
echo "Creating $DISTRIBUTION.json file for SDK..."

0 commit comments

Comments
 (0)