Skip to content

Commit

Permalink
Work around clang-16 build failure
Browse files Browse the repository at this point in the history
Building with clang-16 or newer currently fails as the issue described
in libffi/libffi#760 causes a compile error.

Fix this by adding the -Wno-implicit-function-declaration compiler
flag, which allows the current source code to still be built.

Addresses tov#73.
  • Loading branch information
uweigand committed Apr 1, 2023
1 parent d2092d8 commit ce05302
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions libffi-sys-rs/build/not_msvc.rs
Expand Up @@ -74,6 +74,9 @@ pub fn configure_libffi(prefix: PathBuf, build_dir: &Path) {
.cargo_metadata(false)
.target(&target)
.warnings(false)
// Work around a build failure with clang-16 and newer. Can be removed
// once https://github.com/libffi/libffi/pull/764 is merged.
.flag_if_supported("-Wno-implicit-function-declaration")
.host(&host);
let c_compiler = c_cfg.get_compiler();

Expand Down

0 comments on commit ce05302

Please sign in to comment.