From c4be756c226543f362024c8fa16de0fbc92c2522 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 12:29:12 +0000 Subject: [PATCH 1/3] Update base tag for release-6.0 to swift-6.0-DEVELOPMENT-SNAPSHOT-2024-10-12-a --- schemes/release-6.0/manifest.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/schemes/release-6.0/manifest.json b/schemes/release-6.0/manifest.json index 6b024677..5926ed5f 100644 --- a/schemes/release-6.0/manifest.json +++ b/schemes/release-6.0/manifest.json @@ -1,6 +1,6 @@ { "update-checkout-scheme": "release/6.0", - "base-tag": "swift-6.0-DEVELOPMENT-SNAPSHOT-2024-10-08-a", + "base-tag": "swift-6.0-DEVELOPMENT-SNAPSHOT-2024-10-12-a", "build-compiler": false, "icu4c": ["https://github.com/swiftwasm/icu4c-wasi/releases/download/0.8.0/icu4c-wasi.tar.xz"], "libxml2": ["https://github.com/swiftwasm/libxml2-wasm/releases/download/2.0.0/libxml2-wasm32-unknown-wasi.tar.gz"], From 402399aadbb46fa46cf2fa5b37a9d8bb997fd1db Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Tue, 15 Oct 2024 13:43:40 +0000 Subject: [PATCH 2/3] Update release/6.0 branch patch --- ...2_INCLUDE_DIR-instead-of-hardcoding-.patch | 30 ------------------- 1 file changed, 30 deletions(-) delete mode 100644 schemes/release-6.0/swift-corelibs-foundation/0004-CMake-Use-LIBXML2_INCLUDE_DIR-instead-of-hardcoding-.patch diff --git a/schemes/release-6.0/swift-corelibs-foundation/0004-CMake-Use-LIBXML2_INCLUDE_DIR-instead-of-hardcoding-.patch b/schemes/release-6.0/swift-corelibs-foundation/0004-CMake-Use-LIBXML2_INCLUDE_DIR-instead-of-hardcoding-.patch deleted file mode 100644 index f0d02e34..00000000 --- a/schemes/release-6.0/swift-corelibs-foundation/0004-CMake-Use-LIBXML2_INCLUDE_DIR-instead-of-hardcoding-.patch +++ /dev/null @@ -1,30 +0,0 @@ -From 278d6ffde7788d16455f5dbcef9400b75f849adf Mon Sep 17 00:00:00 2001 -From: Yuta Saito -Date: Wed, 7 Aug 2024 05:10:42 +0000 -Subject: [PATCH] [CMake] Use LIBXML2_INCLUDE_DIR instead of hardcoding - /usr/include/libxml2 - -`find_package(LibXml2 REQUIRED)` sets `LIBXML2_INCLUDE_DIR` to the correct -include directory for the libxml2 headers. Use this variable instead of -hardcoding `/usr/include/libxml2`. This allows the build to work with -custom libxml2 builds on WASI. ---- - Sources/_CFXMLInterface/CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/Sources/_CFXMLInterface/CMakeLists.txt b/Sources/_CFXMLInterface/CMakeLists.txt -index d6e63a3f..d550a520 100644 ---- a/Sources/_CFXMLInterface/CMakeLists.txt -+++ b/Sources/_CFXMLInterface/CMakeLists.txt -@@ -20,7 +20,7 @@ target_include_directories(_CFXMLInterface - ../CoreFoundation/include - PRIVATE - ../CoreFoundation/internalInclude -- /usr/include/libxml2/) -+ ${LIBXML2_INCLUDE_DIR}) - - target_compile_options(_CFXMLInterface INTERFACE - "$<$:SHELL:-Xcc -fmodule-map-file=${CMAKE_CURRENT_SOURCE_DIR}/../CoreFoundation/include/module.modulemap>" --- -2.43.2 - From d516a93bd1e86208b765c9f322eafa3b3d5e1f71 Mon Sep 17 00:00:00 2001 From: Yuta Saito Date: Wed, 16 Oct 2024 05:21:00 +0000 Subject: [PATCH 3/3] Add build fix for TimeZone in swift-foundation --- .../release-6.0/swift-foundation/984.patch | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 schemes/release-6.0/swift-foundation/984.patch diff --git a/schemes/release-6.0/swift-foundation/984.patch b/schemes/release-6.0/swift-foundation/984.patch new file mode 100644 index 00000000..9f599ef3 --- /dev/null +++ b/schemes/release-6.0/swift-foundation/984.patch @@ -0,0 +1,42 @@ +From 904db472e5db7bf77aed8f36f84f761fbd471cda Mon Sep 17 00:00:00 2001 +From: Yuta Saito +Date: Wed, 16 Oct 2024 05:12:44 +0000 +Subject: [PATCH] [wasm] Fix WASI build around TimeZone + +https://github.com/swiftlang/swift-foundation/pull/975 started to +restrict the fallback value for `TZDIR` and it revealed that WASI +platform implicitly depends on TZDIR even though it won't have such +directory. This patch explicitly handles the case for WASI platform for +timezone operations. +--- + Sources/FoundationEssentials/TimeZone/TimeZone.swift | 2 +- + Sources/FoundationEssentials/TimeZone/TimeZone_Cache.swift | 3 +++ + 2 files changed, 4 insertions(+), 1 deletion(-) + +diff --git a/Sources/FoundationEssentials/TimeZone/TimeZone.swift b/Sources/FoundationEssentials/TimeZone/TimeZone.swift +index 9be9de09..fa26a8c7 100644 +--- a/Sources/FoundationEssentials/TimeZone/TimeZone.swift ++++ b/Sources/FoundationEssentials/TimeZone/TimeZone.swift +@@ -390,7 +390,7 @@ extension TimeZone { + + extension TimeZone { + internal static func dataFromTZFile(_ name: String) -> Data { +-#if NO_TZFILE || os(Windows) ++#if NO_TZFILE || os(Windows) || os(WASI) + return Data() + #else + let path = TZDIR + "/" + name +diff --git a/Sources/FoundationEssentials/TimeZone/TimeZone_Cache.swift b/Sources/FoundationEssentials/TimeZone/TimeZone_Cache.swift +index b4c84d71..ccbb69aa 100644 +--- a/Sources/FoundationEssentials/TimeZone/TimeZone_Cache.swift ++++ b/Sources/FoundationEssentials/TimeZone/TimeZone_Cache.swift +@@ -131,6 +131,9 @@ struct TimeZoneCache : Sendable, ~Copyable { + return TimeZone(inner: result) + } + } ++#elseif os(WASI) ++ // WASI doesn't provide a way to get the current timezone for now, so ++ // just return the default GMT timezone. + #else + let buffer = UnsafeMutableBufferPointer.allocate(capacity: Int(PATH_MAX + 1)) + defer { buffer.deallocate() }