Skip to content

Commit e251aea

Browse files
authored
[build] Change Foundation macro checks because of #83422 (#83629)
I missed that `build-script` passes back `false` instead, so use the `true_false` function for broader checking.
1 parent 335c551 commit e251aea

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

utils/build-script-impl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2336,7 +2336,7 @@ for host in "${ALL_HOSTS[@]}"; do
23362336
continue
23372337
fi
23382338

2339-
if [[ "${CROSS_COMPILE_BUILD_SWIFT_TOOLS}" == "0" ]]; then
2339+
if [[ "$(true_false ${CROSS_COMPILE_BUILD_SWIFT_TOOLS})" == "FALSE" ]]; then
23402340
echo "Skipping building Foundation Macros for ${host}, because the host tools are not being built"
23412341
continue
23422342
fi
@@ -2925,7 +2925,7 @@ for host in "${ALL_HOSTS[@]}"; do
29252925
continue
29262926
fi
29272927

2928-
if [[ "${CROSS_COMPILE_BUILD_SWIFT_TOOLS}" == "0" && "${product}" == "foundation_macros" ]]; then
2928+
if [[ "$(true_false ${CROSS_COMPILE_BUILD_SWIFT_TOOLS})" == "FALSE" && "${product}" == "foundation_macros" ]]; then
29292929
echo "Skipping installing Foundation Macros for ${host}, because the host tools are not being built"
29302930
continue
29312931
fi

validation-test/BuildSystem/android_cross_compile.test

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# REQUIRES: standalone_build
22

33
# RUN: %empty-directory(%t)
4-
# RUN: SKIP_XCODE_VERSION_CHECK=1 SWIFT_BUILD_ROOT=%t %swift_src_root/utils/build-script --dry-run --cmake %cmake --swift-testing --swift-testing-macros --install-swift-testing-macros --install-llvm --cross-compile-hosts=android-aarch64 --cross-compile-build-swift-tools=False --android --android-ndk %t/ndk/ --android-arch aarch64 2>&1 | %FileCheck %s
4+
# RUN: SKIP_XCODE_VERSION_CHECK=1 SWIFT_BUILD_ROOT=%t %swift_src_root/utils/build-script --dry-run --cmake %cmake --foundation --swift-testing --swift-testing-macros --install-foundation --install-swift-testing-macros --install-llvm --cross-compile-hosts=android-aarch64 --cross-compile-build-swift-tools=False --android --android-ndk %t/ndk/ --android-arch aarch64 2>&1 | %FileCheck %s
55

66
# CHECK: pushd {{.*}}/llvm-android-aarch64
77
# CHECK-NOT: cmake --build {{.*}}/llvm-android-aarch64 --config
88
# CHECK-NOT: cmake --build {{.*}}/llvm-android-aarch64 {{.*}} install-llvm
99
# CHECK: cmake {{.*}}-DSWIFT_INCLUDE_TOOLS:BOOL=FALSE{{.*}}/swift
10+
# CHECK: Skipping building Foundation Macros for android-aarch64, because the host tools are not being built
11+
# CHECK: Skipping installing Foundation Macros for android-aarch64, because the host tools are not being built
1012
# CHECK: Skipping building Testing Macros for android-aarch64, because the host tools are not being built
1113
# CHECK: Skipping installing Testing Macros for android-aarch64, because the host tools are not being built
1214
# CHECK: cmake {{.*}}-DCMAKE_TOOLCHAIN_FILE:PATH={{.*}}swifttesting-android-aarch64/BuildScriptToolchain.cmake

0 commit comments

Comments
 (0)