Skip to content

Official binaries for wasm32-unknown-unknown (and potentially other WASM platforms?) contain code for the wrong architecture #132802

Open
@emilazy

Description

The compiler-builtins crate compiles C code for WASM platforms since rust-lang/compiler-builtins#566. This works if the C compiler is Clang, as it passes the appropriate -target. However, in a GCC build environment this means that the cc crate will end up silently compiling code for the wrong architecture entirely. This means that, for example, the compiler-builtins shipping for wasm32-unknown-unknown via Rustup contains object files like the following:

45c91108d938afe8-cmpti2.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), with debug_info, not stripped

I suppose that the build for these needs to arrange for Clang to be present, or perhaps even specified explicitly in the target.*.{cc,cxx,linker} settings.

(Was redirected here from rust-lang/compiler-builtins#732.)

Metadata

Assignees

No one assigned

    Labels

    C-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)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions