Merge pull request #82986 from finagolfin/droid

[6.2][android] Small test and build tweaks
This commit is contained in:
finagolfin
2025-07-18 15:22:47 +05:30
committed by GitHub
14 changed files with 22 additions and 9 deletions

View File

@@ -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}")

View File

@@ -15,5 +15,7 @@
// CHECK-CLANG-SAME: '-fmodules'
// CHECK-CLANG-NOT: clang importer driver args
// XFAIL: OS=linux-androideabi
import script
var _ : ScriptTy

View File

@@ -11,6 +11,6 @@ class Foo {
}
}
// armv7: define internal void @makeOne(ptr noalias sret({{.*}}) align 4 %agg.result, float{{( noundef)?}} %f, float{{( noundef)?}} %s)
// armv7: define internal void @makeOne(ptr{{( dead_on_unwind)?}} noalias{{( writable)?}} sret({{.*}}) align 4 %agg.result, float{{( noundef)?}} %f, float{{( noundef)?}} %s)
// armv7s: define internal void @makeOne(ptr noalias sret({{.*}}) align 4 %agg.result, float %f, float %s)
// armv7k: define internal %struct.One @makeOne(float {{.*}}%f, float {{.*}}%s)

View File

@@ -1,4 +1,5 @@
// RUN: %target-swift-ide-test -print-module -module-to-print=Constructors -I %S/Inputs -source-filename=x -enable-experimental-cxx-interop | %FileCheck %s
// XFAIL: OS=linux-androideabi
// CHECK: struct TemplatedCopyConstructor
// CHECK: struct TemplatedCopyConstructorWithExtraArg

View File

@@ -2,6 +2,7 @@
// This test uses -verify-additional-file, which do not work well on Windows.
// UNSUPPORTED: OS=windows-msvc
// XFAIL: OS=linux-androideabi
import Constructors

View File

@@ -1,4 +1,5 @@
// RUN: %target-swift-ide-test -print-module -module-to-print=Constructors -I %S/Inputs/ -source-filename=x -enable-experimental-cxx-interop | %FileCheck %s
// XFAIL: OS=linux-androideabi
// CHECK: struct ExplicitDefaultConstructor {
// CHECK-NEXT: init()

View File

@@ -1,4 +1,5 @@
// RUN: %target-swiftxx-frontend -I %S/Inputs -Xllvm -sil-print-types -emit-silgen %s | %FileCheck %s
// XFAIL: OS=linux-androideabi
import Constructors

View File

@@ -1,4 +1,5 @@
// RUN: %target-typecheck-verify-swift -verify-ignore-unknown -I %S/Inputs -enable-experimental-cxx-interop
// XFAIL: OS=linux-androideabi
import Constructors

View File

@@ -5,4 +5,4 @@ import CustomNewOperator
var x = callsCustomNew()
// Make sure the definition of `operator new` is emitted.
// CHECK: define {{.*}} @{{_ZnwmPv15container_new_t|"\?\?2@YAPEAX_KPEAXUcontainer_new_t@@@Z"}}
// CHECK: define {{.*}} @{{_Znw(j|m)Pv15container_new_t|"\?\?2@YAPEAX_KPEAXUcontainer_new_t@@@Z"}}

View File

@@ -19,7 +19,7 @@
// Temporarily disabling on watchOS (both arm64_32 & armv7k):
// rdar://140330692 (🟠 OSS Swift CI: oss-swift_tools-RA_stdlib-DA_test-device-non_executable failed...
// UNSUPPORTED: OS=watchos
// UNSUPPORTED: OS=watchos, OS=linux-androideabi
//--- main.swift

View File

@@ -16,7 +16,7 @@
// RUN: -sil-verify-all -module-name=test -emit-sil \
// RUN: | %FileCheck --check-prefix CHECK-DISABLED %s
// UNSUPPORTED: CPU=armv7k || CPU=arm64_32
// UNSUPPORTED: CPU=armv7k, CPU=arm64_32, CPU=armv7
// CHECK-DISABLED-NOT: normal_count

View File

@@ -842,6 +842,12 @@ function set_build_options_for_host() {
# and it must be the same for both LLVM and Swift
if [[ "${SWIFT_HOST_TRIPLE}" ]] ; then
# Adding this until we can configure these corelibs repos with a CMake
# toolchain file
SWIFT_TARGET_CMAKE_OPTIONS+=(
-DCMAKE_Swift_COMPILER_TARGET:STRING="${SWIFT_HOST_TRIPLE}"
)
llvm_cmake_options+=(
-DLLVM_HOST_TRIPLE:STRING="${SWIFT_HOST_TRIPLE}"
)

View File

@@ -114,8 +114,8 @@ class LibCurl(cmake_product.CMakeProduct):
self.cmake_options.define('ENABLE_UNIX_SOCKETS', 'NO')
self.cmake_options.define('ENABLE_THREADED_RESOLVER', 'NO')
self.cmake_options.define('USE_ECH', 'NO')
self.cmake_options.deifne('USE_HTTPSRR', 'NO')
self.cmake_options.deifne('USE_OPENSSL_QUIC', 'NO')
self.cmake_options.define('USE_HTTPSRR', 'NO')
self.cmake_options.define('USE_OPENSSL_QUIC', 'NO')
self.generate_toolchain_file_for_darwin_or_linux(host_target)
@@ -123,4 +123,4 @@ class LibCurl(cmake_product.CMakeProduct):
# If we're building zlib, make cmake search in the built toolchain
toolchain_path = self.host_install_destdir(host_target)
self.cmake_options.define('CMAKE_FIND_ROOT_PATH', toolchain_path)
self.build_with_cmake(['libcurl'], self.args.curl_build_variant, [])
self.build_with_cmake(['libcurl_static'], self.args.curl_build_variant, [])

View File

@@ -212,7 +212,7 @@ class Product(object):
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)