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
2 changes: 1 addition & 1 deletion schemes/main/manifest.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"base-tag": "swift-DEVELOPMENT-SNAPSHOT-2025-04-03-a",
"base-tag": "swift-DEVELOPMENT-SNAPSHOT-2025-04-12-a",
"icu4c": [],
"libxml2": [
"https://github.com/swiftwasm/libxml2-wasm/releases/download/2.0.0/libxml2-wasm32-unknown-wasi.tar.gz",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
From 3828fe6d24735d59d53f073d9021b954d28e5750 Mon Sep 17 00:00:00 2001
From: Yuta Saito <[email protected]>
Date: Mon, 14 Apr 2025 18:20:25 +0000
Subject: [PATCH] [wasm] Stop requiring `TZDIR` and `TZDEFAULT` on WASI

Those constants are not used on WASI in Swift side, so there's no
need to require them in the C headers.
---
Sources/_FoundationCShims/include/_CStdlib.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Sources/_FoundationCShims/include/_CStdlib.h b/Sources/_FoundationCShims/include/_CStdlib.h
index 405febc..408a924 100644
--- a/Sources/_FoundationCShims/include/_CStdlib.h
+++ b/Sources/_FoundationCShims/include/_CStdlib.h
@@ -156,7 +156,7 @@
#ifndef TZDEFAULT
#define TZDEFAULT "/etc/localtime"
#endif /* !defined TZDEFAULT */
-#elif TARGET_OS_WINDOWS
+#elif TARGET_OS_WINDOWS || TARGET_OS_WASI
/* not required */
#else
#error "possibly define TZDIR and TZDEFAULT for this platform"
--
2.48.1

6 changes: 5 additions & 1 deletion test/lit.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ config.test_exec_root = lit_config.params.get(
"/tmp/swift-extra-integration-tests")

config.available_features.add("platform="+platform.system())
config.available_features.add("scheme="+lit_config.params.get("scheme", "main"))

# --param scheme=<scheme>
scheme = lit_config.params.get("scheme", "main")
config.scheme = scheme
config.available_features.add("scheme="+scheme)

# --param swift-sdk=<swift-sdk-id>
swift_sdk = lit_config.params.get("swift-sdk")
Expand Down
6 changes: 5 additions & 1 deletion test/swift-sdk/lit.local.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,15 @@ else:
target_swift_build = f"{swift} build {swift_sdk_options}"
config.substitutions.append(("%{target_swift_build}", target_swift_build))

copy_cmd = 'cp %s %t.dir/Sources/Check/Check.swift'
if config.root.scheme in ["release-6.0", "release-6.1", "release-6.2"]:
copy_cmd = 'cp %s %t.dir/Sources/main.swift'

simple_swift_build_steps = [
'rm -rf %t.dir',
'mkdir -p %t.dir',
f'{swift} package init --package-path %t.dir --name Check --type executable',
'cp %s %t.dir/Sources/main.swift',
copy_cmd,
f'{target_swift_build} --package-path %t.dir',
]
config.substitutions.append(("%{target_simple_swift_build}", " && ".join(simple_swift_build_steps)))
Loading