Skip to content

Compiling tests for wasm64-unknown-unknown on latest Nightly results in linking error #121460

@newpavlov

Description

@newpavlov
Contributor

Compiling any crate with cargo test --no-run -Z build-std=std,panic_abort --target=wasm64-unknown-unknown results in the following error: rust-lld: error: /home/dir/.cargo/target/wasm64-unknown-unknown/debug/deps/libtest-ed35d2d81ad088d3.rlib(lib.rmeta): wasm32 object file can't be linked in wasm64 mode. This is a regression introduced in one of the recent NIghtly versions.

Toolchain version: cargo 1.78.0-nightly (194a60b29 2024-02-21)

Activity

added
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on Feb 22, 2024
matthiaskrgr

matthiaskrgr commented on Feb 22, 2024

@matthiaskrgr
Member

Probably related to #120588 cc @alexcrichton

alexcrichton

alexcrichton commented on Feb 22, 2024

@alexcrichton
Member

Yep definitely looks like my fault, I'll work on a fix!

added a commit that references this issue on Feb 22, 2024
6f5030f
added
A-linkageArea: linking into static, shared libraries and binaries
O-wasmTarget: WASM (WebAssembly), http://webassembly.org/
-Zbuild-stdUnstable Cargo option: Compile the standard library yourself.
T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
and removed
needs-triageThis issue may need triage. Remove it if it has been sufficiently triaged.
on Feb 22, 2024
added a commit that references this issue on Feb 23, 2024
646e8e7
added a commit that references this issue on Feb 29, 2024
5099720
added a commit that references this issue on Mar 1, 2024
417b19f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    -Zbuild-stdUnstable Cargo option: Compile the standard library yourself.A-linkageArea: linking into static, shared libraries and binariesC-bugCategory: This is a bug.O-wasmTarget: WASM (WebAssembly), http://webassembly.org/T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @alexcrichton@newpavlov@matthiaskrgr@jieyouxu@rustbot

      Issue actions

        Compiling tests for `wasm64-unknown-unknown` on latest Nightly results in linking error · Issue #121460 · rust-lang/rust