Skip to content

Commit 3912be0

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 bfc64e3 commit 3912be0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

build.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,8 @@ mod c {
327327
// in https://github.com/rust-lang/compiler-rt/blob/c8fbcb3/cmake/config-ix.cmake#L19.
328328
cfg.flag_if_supported("-fomit-frame-pointer");
329329
cfg.define("VISIBILITY_HIDDEN", None);
330+
// Avoid implicitly creating references to undefined functions
331+
cfg.flag("-Werror=implicit-function-declaration");
330332
}
331333

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

0 commit comments

Comments
 (0)