Skip to content

CARGO_ENCODED_RUSTFLAGS doesn't include flags for builtin Cargo options #1613

@madsmtm

Description

@madsmtm

In particular, it doesn't include LTO flags when using Cargo's [profile.*] lto = "..." option.

This prevents us from correctly passing -flto=..., which affects Rust's bootstrap, and which I hit recently in rust-lang/rust#148925.

I'm unsure if this is something that Cargo is aware of, though see e.g. rust-lang/cargo#12437 for a similar issue. CC @weihanglo, how do you think Cargo would best expose to build scripts like cc-rs that it's doing LTO?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions