Skip to content

Commit

Permalink
Build with -Werror=implicit-function-declaration
Browse files Browse the repository at this point in the history
To prevent fail-fast in situations like
rust-lang/rust#125619, where an upstream
source compiles but creates a link error way downstream.
  • Loading branch information
XrXr committed Oct 2, 2024
1 parent bfc64e3 commit 3912be0
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 3912be0

Please sign in to comment.