From febe0f0e7683605e35db6cf1df2d0a1779be29e4 Mon Sep 17 00:00:00 2001 From: Finagolfin Date: Mon, 30 Jun 2025 16:07:51 +0530 Subject: [PATCH] [android] Disable a couple Reflection tests and fix an install path The tests broke on the community Android CI since #82325, and I just noticed the install issue when cross-compiling Testing with a freshly-built compiler, which I'd never done before. Also, fix the NDK path shown in the CMake output. --- cmake/modules/SwiftConfigureSDK.cmake | 2 +- test/Reflection/conformance_descriptors.swift | 1 + test/Reflection/typeref_decoding.swift | 1 + .../swift_build_support/swift_build_support/products/product.py | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake/modules/SwiftConfigureSDK.cmake b/cmake/modules/SwiftConfigureSDK.cmake index d7d909b36e351..4ea95a63ff3d6 100644 --- a/cmake/modules/SwiftConfigureSDK.cmake +++ b/cmake/modules/SwiftConfigureSDK.cmake @@ -53,7 +53,7 @@ function(_report_sdk prefix) endforeach() elseif("${prefix}" STREQUAL "ANDROID") if(NOT "${SWIFT_ANDROID_NDK_PATH}" STREQUAL "") - message(STATUS " NDK: $ENV{SWIFT_ANDROID_NDK_PATH}") + message(STATUS " NDK: ${SWIFT_ANDROID_NDK_PATH}") endif() if(NOT "${SWIFT_ANDROID_NATIVE_SYSROOT}" STREQUAL "") message(STATUS " Sysroot: ${SWIFT_ANDROID_NATIVE_SYSROOT}") diff --git a/test/Reflection/conformance_descriptors.swift b/test/Reflection/conformance_descriptors.swift index b114f76455280..e1bd98c08f4af 100644 --- a/test/Reflection/conformance_descriptors.swift +++ b/test/Reflection/conformance_descriptors.swift @@ -5,6 +5,7 @@ // // Temporarily disable on AArch64 Linux (rdar://88451721) // UNSUPPORTED: OS=linux-gnu && CPU=aarch64 +// XFAIL: OS=linux-android // rdar://100558042 // UNSUPPORTED: CPU=arm64e diff --git a/test/Reflection/typeref_decoding.swift b/test/Reflection/typeref_decoding.swift index e0a3b4465a39e..c01af893eda48 100644 --- a/test/Reflection/typeref_decoding.swift +++ b/test/Reflection/typeref_decoding.swift @@ -10,6 +10,7 @@ // FIXME: rdar://127796117 // UNSUPPORTED: OS=linux-gnu && CPU=aarch64 +// XFAIL: OS=linux-android // RUN: %target-build-swift -target %target-swift-5.2-abi-triple -Xfrontend -enable-anonymous-context-mangled-names %S/Inputs/ConcreteTypes.swift %S/Inputs/GenericTypes.swift %S/Inputs/Protocols.swift %S/Inputs/Extensions.swift %S/Inputs/Closures.swift -parse-as-library -emit-module -emit-library %no-fixup-chains -module-name TypesToReflect -o %t/%target-library-name(TypesToReflect) // RUN: %target-build-swift -target %target-swift-5.2-abi-triple -Xfrontend -enable-anonymous-context-mangled-names %S/Inputs/ConcreteTypes.swift %S/Inputs/GenericTypes.swift %S/Inputs/Protocols.swift %S/Inputs/Extensions.swift %S/Inputs/Closures.swift %S/Inputs/main.swift -emit-module -emit-executable %no-fixup-chains -module-name TypesToReflect -o %t/TypesToReflect diff --git a/utils/swift_build_support/swift_build_support/products/product.py b/utils/swift_build_support/swift_build_support/products/product.py index 274b60373058b..bf0f7fcf67181 100644 --- a/utils/swift_build_support/swift_build_support/products/product.py +++ b/utils/swift_build_support/swift_build_support/products/product.py @@ -212,7 +212,7 @@ def install_toolchain_path(self, host_target): if self.args.cross_compile_hosts: if self.is_darwin_host(host_target): install_destdir = self.host_install_destdir(host_target) - else: + elif self.args.cross_compile_append_host_target_to_destdir: install_destdir = os.path.join(install_destdir, self.args.host_target) return targets.toolchain_path(install_destdir, self.args.install_prefix)