Skip to content

Commit 060c871

Browse files
committed
Permit empty host-toolchain argument in build.sh
1 parent cdbd187 commit 060c871

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

swift-ci/sdks/android/scripts/build.sh

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ function groupend {
5050

5151
function usage {
5252
cat <<EOF
53-
usage: build.sh --source-dir <path> --products-dir <path> --ndk-home <path> --host-toolchain <path>
53+
usage: build.sh --source-dir <path> --products-dir <path> --ndk-home <path>
5454
[--name <sdk-name>] [--version <version>] [--build-dir <path>]
5555
[--archs <arch>[,<arch> ...]]
5656
@@ -158,7 +158,7 @@ done
158158
# Change the commas for spaces
159159
archs="${archs//,/ }"
160160

161-
if [[ -z "$source_dir" || -z "$products_dir" || -z "$ndk_home" || -z "$host_toolchain" ]]; then
161+
if [[ -z "$source_dir" || -z "$products_dir" || -z "$ndk_home" ]]; then
162162
usage
163163
exit 1
164164
fi
@@ -237,8 +237,10 @@ export ANDROID_NDK_HOME=$ndk_home
237237
export ANDROID_NDK=$ndk_home
238238

239239
echo "Swift found at ${swift_dir}"
240-
echo "Host toolchain found at ${host_toolchain}"
241-
${host_toolchain}/bin/swift --version
240+
if [[ ! -z "${host_toolchain}" ]]; then
241+
echo "Host toolchain found at ${host_toolchain}"
242+
${host_toolchain}/bin/swift --version
243+
fi
242244
echo "Android NDK found at ${ndk_home}"
243245
${ndk_installation}/bin/clang --version
244246
echo "Building for ${archs}"

0 commit comments

Comments
 (0)