Skip to content

Support building and testing std with panic=abort #84766

Open
@tmandry

Description

@tmandry

panic=abort is needed in resource-constrained environments, wasm, and when building with the cranelift backend.

Building and testing std with panic=abort today is fraught for at least two reasons:

  1. panic=unwind is still needed for proc macros, so setting target-specific rustflags doesn't work if you want to do this on a host platform.
  2. Many tests (~80 by my count: 1, 2) depend on unwinding, and the test framework doesn't know how to automatically disable them. Many of these are disabled for individual platforms (wasm) or dealt with externally in a somewhat brittle way.

In order to make this work, rustbuild should support this option directly and tests relying on unwinding need to be labelled with needs-unwind.

Given the number of tests this affects and the likelihood of regression, we may also want to test this configuration explicitly in CI. But the wasm builders would serve this purpose almost as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-testsuiteArea: The testsuite used to check the correctness of rustcT-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