Build with -Werror=implicit-function-declaration

To prevent fail-fast in situations like
https://github.com/rust-lang/rust/issues/125619, where an upstream
source compiles but creates a link error way downstream.
This commit is contained in:
Alan Wu 2024-05-30 16:44:39 -04:00 committed by Trevor Gross
parent f5010ea4f9
commit edc6f80dcc

View file

@ -327,6 +327,8 @@ mod c {
// in https://github.com/rust-lang/compiler-rt/blob/c8fbcb3/cmake/config-ix.cmake#L19.
cfg.flag_if_supported("-fomit-frame-pointer");
cfg.define("VISIBILITY_HIDDEN", None);
// Avoid implicitly creating references to undefined functions
cfg.flag("-Werror=implicit-function-declaration");
}
// int_util.c tries to include stdlib.h if `_WIN32` is defined,