Skip to content

Profile based rustflags generate unknown unstable option: build-std #11275

@Wyvern

Description

@Wyvern

When using some -Z flags in profile based rustflags such as build-std build-std-features panic-in-drop=abort, the compiler generate error unknown unstable option: build-std ....

for example: a customized src profile with rustflags:

[profile.src]
inherits = "release"
panic="abort"
rustflags = ["-Zbuild-std=core,alloc,std,"-Zbuild-std-features=panic_immediate_abort","-Zpanic-in-drop=abort"]
[profile.std.build-override]
inherits = "release"
[profile.std.package."*"]
inherits = "release"

When build using cargo b --profile src the above error raised.

Is it a bug of cargo-features = ["profile-rustflags"] or something else?

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions