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

Allow compiling the wasm32-wasi std library with atomics #102372

Merged
merged 3 commits into from
Oct 13, 2022

Commits on Oct 10, 2022

  1. Allow compiling the wasm32-wasi std library with atomics

    The issue rust-lang#102157 demonstrates how currently the `-Z build-std` option
    will fail when re-compiling the standard library with `RUSTFLAGS` like
    `RUSTFLAGS="-C target-feature=+atomics,+bulk-memory -C
    link-args=--shared-memory"`. This change attempts to resolve those build
    issues by depending on the the WebAssembly `futex` module and providing
    an implementation for `env_lock`. Fixes rust-lang#102157.
    abrown committed Oct 10, 2022
    Configuration menu
    Copy the full SHA
    da638b3 View commit details
    Browse the repository at this point in the history
  2. Implement env_lock with RwLock

    Copying the approach of the Unix target, this change uses the standard
    `RwLock` to protect against concurrent access of libc's environment.
    This locking is only enabled when WebAssembly's `atomics` feature is
    also enabled.
    abrown committed Oct 10, 2022
    Configuration menu
    Copy the full SHA
    9530ba0 View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2022

  1. Configuration menu
    Copy the full SHA
    95b0b2d View commit details
    Browse the repository at this point in the history