Skip to content

Cannot run benchmarks with panic = "abort" #3166

@AaronFriel

Description

@AaronFriel

The following error is obtained when running cargo bench, with the a panic = "abort" option in cargo.toml:

error: the linked panic runtime `panic_unwind` is not compiled with this crate's panic strategy `abort`

The cargo.toml needs to set the panic behavior in [profile.bench], e.g.:

cargo.toml:

[package]
name = "foobar"
version = "0.1.0"
authors = ["Aaron Friel <[email protected]>"]

[dependencies]
clap="^2.13.0"

[profile.bench]
panic = "abort"

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