Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ICU-22838 Add WebAssembly/WASI cross-compilation support #3067

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Sep 23, 2024

  1. ICU-22838 Add WebAssembly/WASI cross-compilation support

    * Add config/mh-wasi and update configure script.
    
      WebAssembly/WASI does not support threads and dynamic linking, so
      the new mh-wasi file disables those features in ICU.
    
    * Teach putilimp.h not to define U_TZSET, U_TIMEZONE, and U_TZNAME for WASI
    
      WASI does not define timezone-related functionalities, and wasi-libc
      does not provide tzset, timezone, and tzname. This change teaches
      putilimp.h not to define U_TZSET, U_TIMEZONE, and U_TZNAME for WASI.
    
    * Add `U_HAVE_ATOMICS` and support platforms without atomics like WASI
    
      This change adds a new macro `U_HAVE_ATOMICS` to ICU. This macro is
      always defined to 1 except for platforms that do not support atomic
      operations like WASI. Due to the lack of threading support in WASI, the
      wasi-sdk does not provide `std::atomic`, `std::mutex`, and related
      types, so the new macro is used to disable the use of these types.
    kateinoigakukun committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    9d05a26 View commit details
    Browse the repository at this point in the history
  2. ICU-22838 Address feedback from aheninger

    * icu4c/source/i18n/decimfmt.cpp: Explicitly set the pointers to nullptr
      after deleting them.
    * icu4c/source/i18n/number_mapper.h: Use `= {}` to initialize pointers
      to nullptr instead of `= nullptr` to keep project-wide consistency.
    kateinoigakukun committed Sep 23, 2024
    Configuration menu
    Copy the full SHA
    008b01c View commit details
    Browse the repository at this point in the history