Last active
December 29, 2022 17:58
-
-
Save capnslipp/5c3a1f75172b6076568e24e0535780c5 to your computer and use it in GitHub Desktop.
Per-platform `swift-build-…` scripts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
arch="$(uname -m)" | |
sdk_path="$(xcrun --sdk driverkit --show-sdk-path)" | |
sdk_version="$(xcrun --sdk driverkit --show-sdk-version)" | |
echo "Running: " \ | |
swift build -Xswiftc "-sdk" -Xswiftc "${sdk_path}" -Xswiftc "-target" -Xswiftc "${arch}-apple-driverkit${sdk_version}" "$@" | |
swift build -Xswiftc "-sdk" -Xswiftc "${sdk_path}" -Xswiftc "-target" -Xswiftc "${arch}-apple-driverkit${sdk_version}" "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
sdk_path="$(xcrun --sdk iphoneos --show-sdk-path)" | |
sdk_version="$(xcrun --sdk iphoneos --show-sdk-version)" | |
echo "Running: " \ | |
swift build -Xswiftc "-sdk" -Xswiftc "${sdk_path}" -Xswiftc "-target" -Xswiftc "arm64-apple-ios${sdk_version}" "$@" | |
swift build -Xswiftc "-sdk" -Xswiftc "${sdk_path}" -Xswiftc "-target" -Xswiftc "arm64-apple-ios${sdk_version}" "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
arch="$(uname -m)" | |
sdk_path="$(xcrun --sdk iphonesimulator --show-sdk-path)" | |
sdk_version="$(xcrun --sdk iphonesimulator --show-sdk-version)" | |
echo "Running: " \ | |
swift build -Xswiftc "-sdk" -Xswiftc "${sdk_path}" -Xswiftc "-target" -Xswiftc "${arch}-apple-ios${sdk_version}-simulator" "$@" | |
swift build -Xswiftc "-sdk" -Xswiftc "${sdk_path}" -Xswiftc "-target" -Xswiftc "${arch}-apple-ios${sdk_version}-simulator" "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
arch="$(uname -m)" | |
sdk_path="$(xcrun --sdk macosx --show-sdk-path)" | |
sdk_version="$(xcrun --sdk macosx --show-sdk-version)" | |
echo "Running: " \ | |
swift build -Xswiftc "-sdk" -Xswiftc "${sdk_path}" -Xswiftc "-target" -Xswiftc "${arch}-apple-macosx${sdk_version}" "$@" | |
swift build -Xswiftc "-sdk" -Xswiftc "${sdk_path}" -Xswiftc "-target" -Xswiftc "${arch}-apple-macosx${sdk_version}" "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
sdk_path="$(xcrun --sdk appletvos --show-sdk-path)" | |
sdk_version="$(xcrun --sdk appletvos --show-sdk-version)" | |
echo "Running: " \ | |
swift build -Xswiftc "-sdk" -Xswiftc "${sdk_path}" -Xswiftc "-target" -Xswiftc "arm64-apple-tvos${sdk_version}" "$@" | |
swift build -Xswiftc "-sdk" -Xswiftc "${sdk_path}" -Xswiftc "-target" -Xswiftc "arm64-apple-tvos${sdk_version}" "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
arch="$(uname -m)" | |
sdk_path="$(xcrun --sdk appletvsimulator --show-sdk-path)" | |
sdk_version="$(xcrun --sdk appletvsimulator --show-sdk-version)" | |
echo "Running: " \ | |
swift build -Xswiftc "-sdk" -Xswiftc "${sdk_path}" -Xswiftc "-target" -Xswiftc "${arch}-apple-tvos${sdk_version}-simulator" "$@" | |
swift build -Xswiftc "-sdk" -Xswiftc "${sdk_path}" -Xswiftc "-target" -Xswiftc "${arch}-apple-tvos${sdk_version}-simulator" "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
sdk_path="$(xcrun --sdk watchos --show-sdk-path)" | |
sdk_version="$(xcrun --sdk watchos --show-sdk-version)" | |
echo "Running: " \ | |
swift build -Xswiftc "-sdk" -Xswiftc "${sdk_path}" -Xswiftc "-target" -Xswiftc "arm64-apple-watchos${sdk_version}" "$@" | |
swift build -Xswiftc "-sdk" -Xswiftc "${sdk_path}" -Xswiftc "-target" -Xswiftc "arm64-apple-watchos${sdk_version}" "$@" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
arch="$(uname -m)" | |
sdk_path="$(xcrun --sdk watchsimulator --show-sdk-path)" | |
sdk_version="$(xcrun --sdk watchsimulator --show-sdk-version)" | |
echo "Running: " \ | |
swift build -Xswiftc "-sdk" -Xswiftc "${sdk_path}" -Xswiftc "-target" -Xswiftc "${arch}-apple-watchos${sdk_version}-simulator" "$@" | |
swift build -Xswiftc "-sdk" -Xswiftc "${sdk_path}" -Xswiftc "-target" -Xswiftc "${arch}-apple-watchos${sdk_version}-simulator" "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment