Skip to content

[6.2][android] Small test and build tweaks #82986

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 18, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmake/modules/SwiftConfigureSDK.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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}")
Expand Down
2 changes: 2 additions & 0 deletions test/ClangImporter/pcm-emit-direct-cc1-mode.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@
// CHECK-CLANG-SAME: '-fmodules'
// CHECK-CLANG-NOT: clang importer driver args

// XFAIL: OS=linux-androideabi

import script
var _ : ScriptTy
2 changes: 1 addition & 1 deletion test/IRGen/abitypes_arm.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions test/Interop/Cxx/class/constructors-diagnostics.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
Original file line number Diff line number Diff line change
@@ -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()
Expand Down
1 change: 1 addition & 0 deletions test/Interop/Cxx/class/constructors-silgen.swift
Original file line number Diff line number Diff line change
@@ -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

Expand Down
1 change: 1 addition & 0 deletions test/Interop/Cxx/class/constructors-typechecker.swift
Original file line number Diff line number Diff line change
@@ -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

Expand Down
2 changes: 1 addition & 1 deletion test/Interop/Cxx/class/custom-new-operator-irgen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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"}}
2 changes: 1 addition & 1 deletion test/SILOptimizer/package-cmo-serialize-tables.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion test/SILOptimizer/throws_prediction.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 6 additions & 0 deletions utils/build-script-impl
Original file line number Diff line number Diff line change
Expand Up @@ -841,6 +841,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}"
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ def build(self, host_target):
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)

if self.args.build_zlib:
# 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, [])
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down