rust-lang / cc-rs

Rust library for build scripts to compile C/C++ code into a Rust library
https://docs.rs/cc
Apache License 2.0
1.76k stars 425 forks source link

Stop setting -static if crt-static is used in gcc #1077

Open NobodyXu opened 1 month ago

NobodyXu commented 1 month ago

Fixed #1074

Using -static here doesn't make only compile and does not do any linking, while this technically breaks some use of cc, which converts the compiler to a command and use it to generate statically linked binary, it practices they always need to add -static on clang/msvc compiler.