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.77k stars 427 forks source link

Fix detect_compiler_family.c not being created #1072

Closed Jake-Shadle closed 1 month ago

Jake-Shadle commented 1 month ago

This fixes an issue where the detect_compiler_family.c temp file would not be created, thus falling back to defaults, printing a warning, eg warning: libz-sys@1.1.18: Compiler family detection failed due to error: IOError: No such file or directory (os error 2). I noticed this when debugging a cargo package command, as I believe that is an edge case due to how it differs from a normal cargo build.