Skip to content

Conversation

@kateinoigakukun
Copy link
Member

467631d cherry-picks ICU-22838 Add WebAssembly/WASI cross-compilation support

The original patch is still under review in the upstream ICU project, but it is needed to unblock the swift-foundation build on WebAssembly.

And also adjust CMakeLists.txt and Package.swift to disable timezone and dynamic loading features.

@iCharlesHu
Copy link
Contributor

Hi @kateinoigakukun thanks for the patch! We recently upgraded our ICU to 74 and I'll reapply your patch on top of 74

The original patch is still under review in the upstream ICU project, but
it is needed to unblock the swift-foundation build on WebAssembly.

See unicode-org/icu#3067
`U_TIMEZONE` must not be defined and dynamic loading features must be
disabled for WASI target.
@kateinoigakukun
Copy link
Member Author

Reapplied my patch on the top of the latest main branch :)

@kateinoigakukun
Copy link
Member Author

Confirmed this change does not break other platform builds swiftlang/swift-foundation#823

@iCharlesHu
Copy link
Contributor

Integration test to SwiftCorelibsFoundation: swiftlang/swift-corelibs-foundation#5040

@iCharlesHu
Copy link
Contributor

SwiftCorelibsFoundation and SwiftFoundation integration tests both passed! Merging now...

@iCharlesHu iCharlesHu merged commit ffed0b1 into swiftlang:main Aug 6, 2024
iCharlesHu pushed a commit to iCharlesHu/swift-foundation-icu that referenced this pull request Aug 6, 2024
* Cherry-pick "ICU-22838 Add WebAssembly/WASI cross-compilation support"

The original patch is still under review in the upstream ICU project, but
it is needed to unblock the swift-foundation build on WebAssembly.

See unicode-org/icu#3067

* [Build] Update compile definitions for WASI target

`U_TIMEZONE` must not be defined and dynamic loading features must be
disabled for WASI target.
@kateinoigakukun
Copy link
Member Author

Thanks!

@kateinoigakukun kateinoigakukun deleted the yt/wasi-icu-patch branch August 7, 2024 02:14
iCharlesHu added a commit that referenced this pull request Aug 7, 2024
* Cherry-pick "ICU-22838 Add WebAssembly/WASI cross-compilation support"

The original patch is still under review in the upstream ICU project, but
it is needed to unblock the swift-foundation build on WebAssembly.

See unicode-org/icu#3067

* [Build] Update compile definitions for WASI target

`U_TIMEZONE` must not be defined and dynamic loading features must be
disabled for WASI target.

Co-authored-by: Yuta Saito <kateinoigakukun@gmail.com>
itingliu pushed a commit to itingliu/swift-foundation-icu that referenced this pull request Oct 16, 2025
itingliu added a commit that referenced this pull request Oct 20, 2025
* Update to icu76 (original)

* do not build with darwin platform flag to avoid entering the path that  requires darwin internal SDK

* Fix Linux build

* Reapply renaming expansion like #63

* Fix windows build: Use PI defined in the source in case M_PI isn't defined.

* Add the same flag that we added to Package.swift to cmakefile

* Update to c++17

* Fix cmake flag

* Reapply WASI fix from PR #35

* fix WASI build

---------

Co-authored-by: Yuta Saito <kateinoigakukun@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants