diff --git a/schemes/main/manifest.json b/schemes/main/manifest.json index a000795c..3f5998f2 100644 --- a/schemes/main/manifest.json +++ b/schemes/main/manifest.json @@ -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", diff --git a/schemes/main/swift-foundation/0001-wasm-Stop-requiring-TZDIR-and-TZDEFAULT-on-WASI.patch b/schemes/main/swift-foundation/0001-wasm-Stop-requiring-TZDIR-and-TZDEFAULT-on-WASI.patch new file mode 100644 index 00000000..1cb76e7d --- /dev/null +++ b/schemes/main/swift-foundation/0001-wasm-Stop-requiring-TZDIR-and-TZDEFAULT-on-WASI.patch @@ -0,0 +1,27 @@ +From 3828fe6d24735d59d53f073d9021b954d28e5750 Mon Sep 17 00:00:00 2001 +From: Yuta Saito +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 + diff --git a/test/lit.cfg b/test/lit.cfg index e4ffa1e0..0e5ca24d 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -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 = lit_config.params.get("scheme", "main") +config.scheme = scheme +config.available_features.add("scheme="+scheme) # --param swift-sdk= swift_sdk = lit_config.params.get("swift-sdk") diff --git a/test/swift-sdk/lit.local.cfg b/test/swift-sdk/lit.local.cfg index df5019d3..81cb5236 100644 --- a/test/swift-sdk/lit.local.cfg +++ b/test/swift-sdk/lit.local.cfg @@ -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)))