Skip to content
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
5 changes: 2 additions & 3 deletions Sources/Testing/Support/Versions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,8 @@ let operatingSystemVersion: String = {
}
}
#elseif os(WASI)
if let version = swt_getWASIVersion().flatMap(String.init(validatingCString:)) {
return version
}
// WASI does not have an API to get the current WASI or Wasm version.
// wasi-libc does have uname(3), but it's stubbed out.
#else
#warning("Platform-specific implementation missing: OS version unavailable")
#endif
Expand Down
18 changes: 0 additions & 18 deletions Sources/_TestingInternals/include/Versions.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,24 +53,6 @@ SWT_EXTERN void swt_getTestingLibraryCommit(const char *_Nullable *_Nonnull outH
/// testing library, or `nullptr` if that information is not available.
SWT_EXTERN const char *_Nullable swt_getTargetTriple(void);

#if defined(__wasi__)
/// Get the version of the C standard library and runtime used by WASI, if
/// available.
///
/// This function is provided because `WASI_SDK_VERSION` may or may not be
/// defined and may or may not be a complex macro.
///
/// For more information about the `WASI_SDK_VERSION` macro, see
/// [wasi-libc-#490](https://github.com/WebAssembly/wasi-libc/issues/490).
static const char *_Nullable swt_getWASIVersion(void) {
#if defined(WASI_SDK_VERSION)
return WASI_SDK_VERSION;
#else
return 0;
#endif
}
#endif

SWT_ASSUME_NONNULL_END

#endif
Loading