Skip to content

Linking empty rust file fails with "unable to find library -lc-debug" #17191

Open
@hoodmane

Description

@hoodmane

The following:

touch file.rs
rustc file.rs --target wasm32-unknown-emscripten -C link-arg=-sSIDE_MODULE=1 --crate-type cdylib 

Results in
wasm-ld: error: unable to find library -lc-debug.
Rust always includes -sASSERTIONS=1 in the linker args, see rust-lang/rust#97928.

This seems to be a regression between emscripten version 2.0.27 and version 3.1.6. If I surgically set settings.ASSERTIONS=0, then it still fails with "unable to find library -lc". I don't think it should be trying to link -lc anyways because I am trying to make a side module. But I am not sure what the proper setting is to convince Rust or Emscripten to discard this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions