Merge pull request #522 from pimeys/master

Increase bundled SQLite variables and depth
This commit is contained in:
gwenn 2019-05-15 21:13:46 +02:00 committed by GitHub
commit c87c49cd35
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -29,6 +29,7 @@ fn main() {
mod build_bundled {
use cc;
use std::path::Path;
use std::env;
pub fn main(out_dir: &str, out_path: &Path) {
if cfg!(feature = "sqlcipher") {
@ -79,6 +80,17 @@ mod build_bundled {
if cfg!(feature = "session") {
cfg.flag("-DSQLITE_ENABLE_SESSION");
}
if let Ok(limit) = env::var("SQLITE_MAX_VARIABLE_NUMBER") {
cfg.flag(&format!("-DSQLITE_MAX_VARIABLE_NUMBER={}", limit));
}
println!("cargo:rerun-if-env-changed=SQLITE_MAX_VARIABLE_NUMBER");
if let Ok(limit) = env::var("SQLITE_MAX_EXPR_DEPTH") {
cfg.flag(&format!("-DSQLITE_MAX_EXPR_DEPTH={}", limit));
}
println!("cargo:rerun-if-env-changed=SQLITE_MAX_EXPR_DEPTH");
cfg.compile("libsqlite3.a");
println!("cargo:lib_dir={}", out_dir);