Skip to content

build-std: wasm32-unknown-unknown failing with overflow-checks=true and LTO #10118

Closed
rust-lang/rust
#113923
@athei

Description

@athei

Problem

It seems that recompiling libstd/libcore with overflow checks isn't something you want to to. At least it leads to some annoying bugs:
rust-lang/rust#78744
rust-lang/rust#91158

I wonder if recompiling the standard library with overflow checks is even useful. It seems that we are perfectly fine with enabling overflow-checks=true in some workspace and then link against the precompiled version of libstd (which isn't compiled without these checks). Please correct me if I am wrong here.

Proposed Solution

The -Z build-std feature should always disable overflow-checks when building the standard library no matter what is defined in the Cargo.toml of the workspace in question.

Notes

Is there some workaround where I can make the std build use a different profile than the workspace?

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions