Skip to content

Commit 7ce4df7

Browse files
Merge pull request #73746 from kateinoigakukun/yt/repair-wasm-ci-20240519
2 parents 295c845 + 0f50aca commit 7ce4df7

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

test/IRGen/section_wasm.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
// ASM-NOT: .section{{.*}}__TEXT,__mysection
88
// ASM: .section ".text.$s7section3fooyyF"
99
// ASM: $s7section3fooyyF:
10-
// ASM: .section ".text.$s7section8MyStructV3fooyyF","",@
10+
// ASM: .section ".text.$s7section8MyStructV3fooyyF","R",@
1111
// ASM: $s7section8MyStructV3fooyyF:
1212

1313
// Wasm places one-time init token on .bss section before each "__TEXT,__mysection"
File renamed without changes.

test/stdlib/Duration.swift

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ if #available(SwiftStdlib 5.7, *) {
2828
// Divide by 1000 to get back to a duration with representable components:
2929
let smallerDuration = duration / 1000
3030
expectEqual(smallerDuration.components, (170_000_000_000_000_000, 0))
31+
#if !os(WASI)
3132
// Now check that the components of the original value trap:
3233
expectCrashLater()
3334
let _ = duration.components
35+
#endif
3436
}
3537

3638
suite.test("milliseconds from Double") {
@@ -166,9 +168,11 @@ if #available(SwiftStdlib 6.0, *) {
166168
let minRep = Duration.seconds(-166020696663385964544 as Int128)
167169
expectEqual(minRep._high,-9_000_000_000_000_000_000)
168170
expectEqual(minRep._low, 0)
171+
#if !os(WASI)
169172
// Check just above the overflow boundary
170173
expectCrashLater()
171174
let _ = Duration.seconds( 170141183460469231732 as Int128)
175+
#endif
172176
}
173177

174178
suite.test("milliseconds from Int128") {
@@ -184,9 +188,11 @@ if #available(SwiftStdlib 6.0, *) {
184188
let minRep = Duration.milliseconds(-170134320591823194554368 as Int128)
185189
expectEqual(minRep._high,-9_223_000_000_000_000_000)
186190
expectEqual(minRep._low, 0)
191+
#if !os(WASI)
187192
// Check just above the overflow boundary
188193
expectCrashLater()
189194
let _ = Duration.milliseconds( 170141183460469231731689 as Int128)
195+
#endif
190196
}
191197

192198
suite.test("microseconds from Int128") {
@@ -202,9 +208,11 @@ if #available(SwiftStdlib 6.0, *) {
202208
let minRep = Duration.microseconds(-170141182780618614507569152 as Int128)
203209
expectEqual(minRep._high,-9_223_372_000_000_000_000)
204210
expectEqual(minRep._low, 0)
211+
#if !os(WASI)
205212
// Check just above the overflow boundary
206213
expectCrashLater()
207214
let _ = Duration.microseconds( 170141183460469231731687304 as Int128)
215+
#endif
208216
}
209217

210218
suite.test("nanoseconds from Int128") {
@@ -220,8 +228,10 @@ if #available(SwiftStdlib 6.0, *) {
220228
let minRep = Duration.nanoseconds(-170141183444701401161113010176 as Int128)
221229
expectEqual(minRep._high,-9_223_372_036_000_000_000)
222230
expectEqual(minRep._low, 0)
231+
#if !os(WASI)
223232
// Check just above the overflow boundary
224233
expectCrashLater()
225234
let _ = Duration.nanoseconds( 170141183460469231731687303716 as Int128)
235+
#endif
226236
}
227237
}

utils/swift_build_support/swift_build_support/products/wasmstdlib.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ def _build(self, host_target, target_triple):
6161
'SWIFT_NATIVE_SWIFT_TOOLS_PATH:STRING', os.path.join(toolchain_path, 'bin'))
6262
self.cmake_options.define(
6363
'SWIFT_NATIVE_LLVM_TOOLS_PATH:STRING', os.path.join(toolchain_path, 'bin'))
64+
self.cmake_options.define(
65+
'BOOTSTRAPPING_MODE:STRING', 'CROSSCOMPILE')
6466
self.cmake_options.define(
6567
'SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER:BOOL', 'FALSE')
6668
self.cmake_options.define('SWIFT_WASI_SYSROOT_PATH:STRING',
@@ -112,7 +114,7 @@ def _build(self, host_target, target_triple):
112114
# Test configuration
113115
self.cmake_options.define('SWIFT_INCLUDE_TESTS:BOOL', 'TRUE')
114116
self.cmake_options.define('SWIFT_ENABLE_SOURCEKIT_TESTS:BOOL', 'FALSE')
115-
lit_test_paths = ['IRGen', 'stdlib', 'Concurrency/Runtime', 'embedded']
117+
lit_test_paths = ['IRGen', 'stdlib', 'Concurrency/Runtime', 'embedded/wasm']
116118
lit_test_paths = [os.path.join(
117119
self.build_dir, 'test-wasi-wasm32', path) for path in lit_test_paths]
118120
self.cmake_options.define('SWIFT_LIT_TEST_PATHS:STRING',

0 commit comments

Comments
 (0)