Disable -flto=thin on GNU compilers

This commit is contained in:
Alexandre Bury 2022-10-04 19:28:44 -04:00
parent f9ece88244
commit 75bf78cee9

View file

@ -138,7 +138,13 @@ fn compile_zstd() {
config.define("ZSTD_LIB_DEPRECATED", Some("0"));
config.flag_if_supported("-flto=thin");
if config.get_compiler().is_like_gnu() {
config.flag_if_supported("-fwhopr");
} else {
// gcc has a -flto but not -flto=thin
// Apparently this is causing crashes on windows-gnu?
config.flag_if_supported("-flto=thin");
}
#[cfg(feature = "thin")]
{