From 51f6a24d60d2411ffbadd0cdfbfac41f80454a24 Mon Sep 17 00:00:00 2001 From: John Gallagher Date: Sat, 31 Dec 2016 01:02:29 -0500 Subject: [PATCH] Set build flags for bundled libsqlite. Build flags from @chamakits; see https://github.com/jgallagher/rusqlite/pull/176. --- libsqlite3-sys/build.rs | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/libsqlite3-sys/build.rs b/libsqlite3-sys/build.rs index 08675f4..7d15629 100644 --- a/libsqlite3-sys/build.rs +++ b/libsqlite3-sys/build.rs @@ -29,5 +29,25 @@ fn main() { #[cfg(feature = "bundled")] fn main() { - gcc::compile_library("libsqlite3.a", &["sqlite3/sqlite3.c"]); + gcc::Config::new() + .file("sqlite3/sqlite3.c") + .flag("-DSQLITE_CORE") + .flag("-DSQLITE_DEFAULT_FOREIGN_KEYS=1") + .flag("-DSQLITE_ENABLE_API_ARMOR") + .flag("-DSQLITE_ENABLE_COLUMN_METADATA") + .flag("-DSQLITE_ENABLE_DBSTAT_VTAB") + .flag("-DSQLITE_ENABLE_FTS3") + .flag("-DSQLITE_ENABLE_FTS3_PARENTHESIS") + .flag("-DSQLITE_ENABLE_FTS5") + .flag("-DSQLITE_ENABLE_JSON1") + .flag("-DSQLITE_ENABLE_LOAD_EXTENSION=1") + .flag("-DSQLITE_ENABLE_MEMORY_MANAGEMENT") + .flag("-DSQLITE_ENABLE_RTREE") + .flag("-DSQLITE_ENABLE_STAT2") + .flag("-DSQLITE_ENABLE_STAT4") + .flag("-DSQLITE_HAVE_ISNAN") + .flag("-DSQLITE_SOUNDEX") + .flag("-DSQLITE_THREADSAFE=1") + .flag("-DSQLITE_USE_URI") + .compile("libsqlite3.a"); }