Skip to content

Allow suppression of cargo warning instructions in output #916

Closed
@scootermon

Description

@scootermon

Right now cc allows for the suppression of specific cargo instructions using .cargo_metdata(false), but this doesn't affect the output of cargo:warning= lines.
I'm working on a bindings library which uses compilation tests to determine whether certain features are supported or not. CC already almost fully supports this use-case1, the only issue being that the warnings and errors show up as though they're part of the "main compilation".

Since I belive this feature is unrelated to the behaviour of cargo_metadata, how would you feel about adding a .cargo_warnings(false) setting that allows us to disable the warnings?
I'm of course happy to contribute the implementation.

Footnotes

  1. Shoutout to Expose function compile to an object file #912, which will also help here because it helps remove an otherwise unnecessary step from the compilation tests

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