Skip to content

Commit 52484b7

Browse files
[WASM] Fix to build StdlibUnittest for WASM (#198)
1 parent 9e66552 commit 52484b7

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

stdlib/private/StdlibUnittest/StdlibUnittest.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -811,8 +811,10 @@ var _testSuiteNameToIndex: [String : Int] = [:]
811811
let _stdlibUnittestStreamPrefix = "__STDLIB_UNITTEST__"
812812
let _crashedPrefix = "CRASHED:"
813813

814+
#if !os(WASI)
814815
@_silgen_name("installTrapInterceptor")
815816
func _installTrapInterceptor()
817+
#endif
816818

817819
#if _runtime(_ObjC)
818820
@objc protocol _StdlibUnittestNSException {
@@ -823,7 +825,9 @@ func _installTrapInterceptor()
823825
// Avoid serializing references to objc_setUncaughtExceptionHandler in SIL.
824826
@inline(never)
825827
func _childProcess() {
828+
#if !os(WASI)
826829
_installTrapInterceptor()
830+
#endif
827831

828832
#if _runtime(_ObjC)
829833
objc_setUncaughtExceptionHandler {

0 commit comments

Comments
 (0)