From 8fc50a8f749a8133628c332eac38e807ad10d1c2 Mon Sep 17 00:00:00 2001 From: Victor Porof Date: Fri, 13 Sep 2019 19:30:02 +0200 Subject: [PATCH] Use all compiler flags from the makefile when building (#64) Signed-off-by: Victor Porof --- lmdb-sys/build.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lmdb-sys/build.rs b/lmdb-sys/build.rs index bd01c8c..3caeb24 100644 --- a/lmdb-sys/build.rs +++ b/lmdb-sys/build.rs @@ -43,7 +43,10 @@ fn main() { .define("MDB_IDL_LOGN", Some(MDB_IDL_LOGN.to_string().as_str())) .file(lmdb.join("mdb.c")) .file(lmdb.join("midl.c")) + // https://github.com/mozilla/lmdb/blob/b7df2cac50fb41e8bd16aab4cc5fd167be9e032a/libraries/liblmdb/Makefile#L23 .flag_if_supported("-Wno-unused-parameter") + .flag_if_supported("-Wbad-function-cast") + .flag_if_supported("-Wuninitialized") .compile("liblmdb.a") } }