Skip to content

Commit 97c266e

Browse files
committed
Build with -Werror=implicit-function-declaration
To prevent fail-fast in situations like rust-lang/rust#125619, where an upstream source compiles but creates a link error way downstream.
1 parent c04eb9e commit 97c266e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: build.rs

+2
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,8 @@ mod c {
321321
// in https://github.com/rust-lang/compiler-rt/blob/c8fbcb3/cmake/config-ix.cmake#L19.
322322
cfg.flag_if_supported("-fomit-frame-pointer");
323323
cfg.define("VISIBILITY_HIDDEN", None);
324+
// Avoid implicitly creating references to undefined functions
325+
cfg.flag("-Werror=implicit-function-declaration");
324326
}
325327

326328
// int_util.c tries to include stdlib.h if `_WIN32` is defined,

0 commit comments

Comments
 (0)