warning: [email protected]+zstd.1.5.7: cl : Command line warning D9002 : ignoring unknown option '-fvisibility=hidden'
Hi,
on Windows with x86_64-pc-windows-msvc stable Rust 1.91 (rustc 1.91.0 (f8297e351 2025-10-28)) I am getting a command line warning from cl.exe for -fvisibility=hidden on zstd-sys.
Literally this line repeated a few dozen times:
warning: [email protected]+zstd.1.5.7: cl : Command line warning D9002 : ignoring unknown option '-fvisibility=hidden'
I am probably by far not as well-versed as anyone frequenting here, but I think the passing of -fvisibility=hidden should be behind a condition.
Relates to #58 as per the comment above the flag.
Hi, and thanks for the report!
Indeed, python-zstandard (which served as the inspiration to add this flag initially) now does it conditionally:
https://github.com/indygreg/python-zstandard/blob/7a77a7510b8ce068e4a103d29aea1b5ec829d8b6/setup_zstd.py#L88-L89
Let's do that here as well