1- commit 2e87eb24f85f3e84bff78051fba4870a5c061ec0
2- Author: finagolfin
3- Date: Mon Jun 30 10:39:26 2025
4-
5- [test] Fix or disable tests for 32-bit platforms (#82501)
6-
7- Fix two IRGen tests that are failing on Android armv7 and disable eight ClangImporter, C++ Interop, and SILOptimizer tests, two of which that were already failing on other 32-bit platforms.
8-
9- diff --git a/swift/test/ClangImporter/pcm-emit-direct-cc1-mode.swift b/swift/test/ClangImporter/pcm-emit-direct-cc1-mode.swift
10- index f5048b9e3d5..6bc26ca3177 100644
11- --- a/swift/test/ClangImporter/pcm-emit-direct-cc1-mode.swift
12- +++ b/swift/test/ClangImporter/pcm-emit-direct-cc1-mode.swift
13- @@ -15,5 +15,7 @@
14- // CHECK-CLANG-SAME: '-fmodules'
15- // CHECK-CLANG-NOT: clang importer driver args
16-
17- + // XFAIL: OS=linux-androideabi
18- +
19- import script
20- var _ : ScriptTy
21- diff --git a/swift/test/IRGen/abitypes_arm.swift b/swift/test/IRGen/abitypes_arm.swift
22- index 9428294483d..52bd8b10145 100644
23- --- a/swift/test/IRGen/abitypes_arm.swift
24- +++ b/swift/test/IRGen/abitypes_arm.swift
25- @@ -11,6 +11,6 @@ class Foo {
26- }
27- }
28-
29- - // armv7: define internal void @makeOne(ptr noalias sret({{.*}}) align 4 %agg.result, float{{( noundef)?}} %f, float{{( noundef)?}} %s)
30- + // armv7: define internal void @makeOne(ptr{{( dead_on_unwind)?}} noalias{{( writable)?}} sret({{.*}}) align 4 %agg.result, float{{( noundef)?}} %f, float{{( noundef)?}} %s)
31- // armv7s: define internal void @makeOne(ptr noalias sret({{.*}}) align 4 %agg.result, float %f, float %s)
32- // armv7k: define internal %struct.One @makeOne(float {{.*}}%f, float {{.*}}%s)
33- diff --git a/swift/test/Interop/Cxx/class/constructors-copy-module-interface.swift b/swift/test/Interop/Cxx/class/constructors-copy-module-interface.swift
34- index 042c10e7d1d..254f6543b58 100644
35- --- a/swift/test/Interop/Cxx/class/constructors-copy-module-interface.swift
36- +++ b/swift/test/Interop/Cxx/class/constructors-copy-module-interface.swift
37- @@ -1,4 +1,5 @@
38- // RUN: %target-swift-ide-test -print-module -module-to-print=Constructors -I %S/Inputs -source-filename=x -enable-experimental-cxx-interop | %FileCheck %s
39- + // XFAIL: OS=linux-androideabi
40-
41- // CHECK: struct TemplatedCopyConstructor
42- // CHECK: struct TemplatedCopyConstructorWithExtraArg
43- diff --git a/swift/test/Interop/Cxx/class/constructors-diagnostics.swift b/swift/test/Interop/Cxx/class/constructors-diagnostics.swift
44- index aac01480660..8fa99fae7fb 100644
45- --- a/swift/test/Interop/Cxx/class/constructors-diagnostics.swift
46- +++ b/swift/test/Interop/Cxx/class/constructors-diagnostics.swift
47- @@ -2,6 +2,7 @@
48-
49- // This test uses -verify-additional-file, which do not work well on Windows.
50- // UNSUPPORTED: OS=windows-msvc
51- + // XFAIL: OS=linux-androideabi
52-
53- import Constructors
54-
55- diff --git a/swift/test/Interop/Cxx/class/constructors-module-interface.swift b/swift/test/Interop/Cxx/class/constructors-module-interface.swift
56- index bf189b6e302..d2c3d65f03e 100644
57- --- a/swift/test/Interop/Cxx/class/constructors-module-interface.swift
58- +++ b/swift/test/Interop/Cxx/class/constructors-module-interface.swift
59- @@ -1,4 +1,5 @@
60- // RUN: %target-swift-ide-test -print-module -module-to-print=Constructors -I %S/Inputs/ -source-filename=x -enable-experimental-cxx-interop | %FileCheck %s
61- + // XFAIL: OS=linux-androideabi
62-
63- // CHECK: struct ExplicitDefaultConstructor {
64- // CHECK-NEXT: init()
65- diff --git a/swift/test/Interop/Cxx/class/constructors-silgen.swift b/swift/test/Interop/Cxx/class/constructors-silgen.swift
66- index b1624ccccfe..79cbdf170de 100644
67- --- a/swift/test/Interop/Cxx/class/constructors-silgen.swift
68- +++ b/swift/test/Interop/Cxx/class/constructors-silgen.swift
69- @@ -1,4 +1,5 @@
70- // RUN: %target-swiftxx-frontend -I %S/Inputs -Xllvm -sil-print-types -emit-silgen %s | %FileCheck %s
71- + // XFAIL: OS=linux-androideabi
72-
73- import Constructors
74-
75- diff --git a/swift/test/Interop/Cxx/class/constructors-typechecker.swift b/swift/test/Interop/Cxx/class/constructors-typechecker.swift
76- index 8ce10b1ca75..52ff4104b83 100644
77- --- a/swift/test/Interop/Cxx/class/constructors-typechecker.swift
78- +++ b/swift/test/Interop/Cxx/class/constructors-typechecker.swift
79- @@ -1,4 +1,5 @@
80- // RUN: %target-typecheck-verify-swift -verify-ignore-unknown -I %S/Inputs -enable-experimental-cxx-interop
81- + // XFAIL: OS=linux-androideabi
82-
83- import Constructors
84-
85- diff --git a/swift/test/Interop/Cxx/class/custom-new-operator-irgen.swift b/swift/test/Interop/Cxx/class/custom-new-operator-irgen.swift
86- index 74e692c9db2..0423493afac 100644
87- --- a/swift/test/Interop/Cxx/class/custom-new-operator-irgen.swift
88- +++ b/swift/test/Interop/Cxx/class/custom-new-operator-irgen.swift
89- @@ -5,4 +5,4 @@ import CustomNewOperator
90- var x = callsCustomNew()
91-
92- // Make sure the definition of `operator new` is emitted.
93- - // CHECK: define {{.*}} @{{_ZnwmPv15container_new_t|"\?\?2@YAPEAX_KPEAXUcontainer_new_t@@@Z"}}
94- + // CHECK: define {{.*}} @{{_Znw(j|m)Pv15container_new_t|"\?\?2@YAPEAX_KPEAXUcontainer_new_t@@@Z"}}
95- diff --git a/swift/test/SILOptimizer/package-cmo-serialize-tables.swift b/swift/test/SILOptimizer/package-cmo-serialize-tables.swift
96- index 382ff2e8080..f061374b2a1 100644
97- --- a/swift/test/SILOptimizer/package-cmo-serialize-tables.swift
98- +++ b/swift/test/SILOptimizer/package-cmo-serialize-tables.swift
99- @@ -19,7 +19,7 @@
100-
101- // Temporarily disabling on watchOS (both arm64_32 & armv7k):
102- // rdar://140330692 (🟠 OSS Swift CI: oss-swift_tools-RA_stdlib-DA_test-device-non_executable failed...
103- - // UNSUPPORTED: OS=watchos
104- + // UNSUPPORTED: OS=watchos, OS=linux-androideabi
105-
106- //--- main.swift
107-
108- diff --git a/swift/test/SILOptimizer/throws_prediction.swift b/swift/test/SILOptimizer/throws_prediction.swift
109- index f7f2664b2de..01d36e127c6 100644
110- --- a/swift/test/SILOptimizer/throws_prediction.swift
111- +++ b/swift/test/SILOptimizer/throws_prediction.swift
112- @@ -16,7 +16,7 @@
113- // RUN: -sil-verify-all -module-name=test -emit-sil \
114- // RUN: | %FileCheck --check-prefix CHECK-DISABLED %s
115-
116- - // UNSUPPORTED: CPU=armv7k || CPU=arm64_32
117- + // UNSUPPORTED: CPU=armv7k, CPU=arm64_32, CPU=armv7
118-
119- // CHECK-DISABLED-NOT: normal_count
120-
121- diff --git a/swift/utils/build-script-impl b/swift/utils/build-script-impl
122- index 16e05052609..7ab8cebfab8 100755
123- --- a/swift/utils/build-script-impl
124- +++ b/swift/utils/build-script-impl
125- @@ -828,6 +828,9 @@ function set_build_options_for_host() {
126- # and it must be the same for both LLVM and Swift
127-
128- if [[ "${SWIFT_HOST_TRIPLE}" ]] ; then
129- + SWIFT_TARGET_CMAKE_OPTIONS+=(
130- + -DCMAKE_Swift_COMPILER_TARGET:STRING="${SWIFT_HOST_TRIPLE}"
131- + )
132- llvm_cmake_options+=(
133- -DLLVM_HOST_TRIPLE:STRING="${SWIFT_HOST_TRIPLE}"
134- )
1351diff --git a/swift/utils/swift_build_support/swift_build_support/cmake.py b/swift/utils/swift_build_support/swift_build_support/cmake.py
1362index bfb69965890..b5e9f5349c2 100644
1373--- a/swift/utils/swift_build_support/swift_build_support/cmake.py
@@ -149,16 +15,3 @@ index bfb69965890..b5e9f5349c2 100644
14915 define("CMAKE_Swift_COMPILER:PATH", cmake_swiftc_path)
15016 else:
15117 cmake_swiftc_path = os.getenv('CMAKE_Swift_COMPILER', toolchain.swiftc)
152- diff --git a/swift/utils/swift_build_support/swift_build_support/products/product.py b/swift/utils/swift_build_support/swift_build_support/products/product.py
153- index 274b6037305..bf0f7fcf671 100644
154- --- a/swift/utils/swift_build_support/swift_build_support/products/product.py
155- +++ b/swift/utils/swift_build_support/swift_build_support/products/product.py
156- @@ -212,7 +212,7 @@ class Product(object):
157- if self.args.cross_compile_hosts:
158- if self.is_darwin_host(host_target):
159- install_destdir = self.host_install_destdir(host_target)
160- - else:
161- + elif self.args.cross_compile_append_host_target_to_destdir:
162- install_destdir = os.path.join(install_destdir, self.args.host_target)
163- return targets.toolchain_path(install_destdir,
164- self.args.install_prefix)
0 commit comments