Skip to content

How can I pass some compiler flags to certain crates? #10014

Closed as not planned
Closed as not planned
@fCorleone

Description

@fCorleone

Problem

I want to compile a project with cargo build. This project has one binary and several libraries. I would like to pass some compiler flags such as llvm-args=-sanitizer-coverage-level=2 to certain crates. If I change the environment variable: RUSTFLAGS, all the dependencies will also be passed with the flags. Is there a way?

Proposed Solution

No response

Notes

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-rustflagsArea: rustflagsC-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