From 893389fb6b4ae8c064801d6d1665d6247330bcf0 Mon Sep 17 00:00:00 2001 From: Allan Shortlidge Date: Thu, 16 Jan 2025 18:17:53 -0800 Subject: [PATCH] Fix the build for WASI. --- Sources/Testing/Discovery.swift | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Sources/Testing/Discovery.swift b/Sources/Testing/Discovery.swift index 0a566c36c..d9acdca19 100644 --- a/Sources/Testing/Discovery.swift +++ b/Sources/Testing/Discovery.swift @@ -86,8 +86,13 @@ struct TestContentRecord: Sendable where T: ~Copyable { /// with interfaces such as `dlsym()` that expect such a pointer. #if SWT_NO_DYNAMIC_LINKING @available(*, unavailable, message: "Image addresses are not available on this platform.") -#endif + nonisolated(unsafe) var imageAddress: UnsafeRawPointer? { + get { fatalError() } + set { fatalError() } + } +#else nonisolated(unsafe) var imageAddress: UnsafeRawPointer? +#endif /// The underlying test content record loaded from a metadata section. private var _record: __TestContentRecord