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

std: Get the standard library compiling for wasm64 #90382

Merged
merged 17 commits into from
Nov 18, 2021

Commits on Nov 10, 2021

  1. std: Get the standard library compiling for wasm64

    This commit goes through and updates various `#[cfg]` as appropriate to
    get the wasm64-unknown-unknown target behaving similarly to the
    wasm32-unknown-unknown target. Most of this is just updating various
    conditions for `target_arch = "wasm32"` to also account for `target_arch
    = "wasm64"` where appropriate. This commit also lists `wasm64` as an
    allow-listed architecture to not have the `restricted_std` feature
    enabled, enabling experimentation with `-Z build-std` externally.
    
    The main goal of this commit is to enable playing around with
    `wasm64-unknown-unknown` externally via `-Z build-std` in a way that's
    similar to the `wasm32-unknown-unknown` target. These targets are
    effectively the same and only differ in their pointer size, but wasm64
    is much newer and has much less ecosystem/library support so it'll still
    take time to get wasm64 fully-fledged.
    alexcrichton committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    7f3ffbc View commit details
    Browse the repository at this point in the history
  2. Enable WebAssembly features by default on wasm64

    These are all stable as-of-now in the WebAssembly specification so any
    engine which implements wasm64 will surely implement these features as
    well.
    alexcrichton committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    cfb2f98 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9716388 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    f738abe View commit details
    Browse the repository at this point in the history
  5. Review comments

    alexcrichton committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    caa9e4a View commit details
    Browse the repository at this point in the history
  6. Fix a crash with wasm64 in LLVM

    This commit works around a crash in LLVM when the
    `-generate-arange-section` argument is passed to LLVM. An LLVM bug is
    opened for this and the code in question is also set to continue passing
    this flag with LLVM 14, assuming that this is fixed by the time LLVM 14
    comes out. Otherwise this should work around debuginfo crashes on LLVM
    13.
    alexcrichton committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    d208e19 View commit details
    Browse the repository at this point in the history
  7. Update more rustc/libtest things for wasm64

    * Add wasm64 variants for inline assembly along the same lines as wasm32
    * Update a few directives in libtest to check for `target_family`
      instead of `target_arch`
    * Update some rustc codegen and typechecks specialized for wasm32 to
      also work for wasm64.
    alexcrichton committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    d2a3c24 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    a3b9405 View commit details
    Browse the repository at this point in the history
  9. Update stdarch/compiler_builtins

    Brings in some fixes and better support for the wasm64 target.
    alexcrichton committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    88f1bf7 View commit details
    Browse the repository at this point in the history
  10. Update dlmalloc for libstd

    This pulls in a fix for wasm64 to work correctly with this dlmalloc
    alexcrichton committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    b5c3f4c View commit details
    Browse the repository at this point in the history
  11. Update stdarch/dlmalloc

    Ensure that they compile with the now-a-feature-is-required logic.
    alexcrichton committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    e4b3496 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    9d6f7f7 View commit details
    Browse the repository at this point in the history
  13. Update src/doc/rustc/src/platform-support.md

    Co-authored-by: Josh Triplett <josh@joshtriplett.org>
    alexcrichton and joshtriplett committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    1d74c77 View commit details
    Browse the repository at this point in the history
  14. Add a missing doc link

    alexcrichton committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    9a44235 View commit details
    Browse the repository at this point in the history
  15. Disable .debug_aranges for all wasm targets

    This follows from discussion on
    https://bugs.llvm.org/show_bug.cgi?id=52442 where it looks like this
    section doesn't make sense for wasm targets.
    alexcrichton committed Nov 10, 2021
    Configuration menu
    Copy the full SHA
    7dc3836 View commit details
    Browse the repository at this point in the history

Commits on Nov 16, 2021

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

Commits on Nov 17, 2021

  1. Fix emscripten tests

    alexcrichton committed Nov 17, 2021
    Configuration menu
    Copy the full SHA
    af217f7 View commit details
    Browse the repository at this point in the history