Set build flags for bundled libsqlite.

Build flags from @chamakits; see https://github.com/jgallagher/rusqlite/pull/176.
This commit is contained in:
John Gallagher 2016-12-31 01:02:29 -05:00
parent ff70f78ff3
commit 51f6a24d60

View File

@ -29,5 +29,25 @@ fn main() {
#[cfg(feature = "bundled")] #[cfg(feature = "bundled")]
fn main() { 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");
} }