Skip to content

How to suppress cargo build script warnings with msvc? #3880

@peakschris

Description

@peakschris

We see the following very noisy warning from rules_rust:

D:\workdir\myproject>bazel build //...
INFO: Analyzed 229 targets (2186 packages loaded, 86137 targets configured).
INFO: From Running Cargo build script zstd-sys:
Build Script Warning: cl : Command line warning D9025 : overriding '/W0' with '/W4'
Build Script Warning: cl : Command line warning D9002 : ignoring unknown option '-fvisibility=hidden'
(snip)

How best to suppress this? I would normally add /wd9025 /wd9002 but I'm not sure how to pass this through to the cargo build script?

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageThe ticket needs maintainer attention.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions