• Home
  • Raw
  • Download

Lines Matching +full:bare +full:- +full:cross +full:- +full:build

8         // When inside mozilla-central, we are included into the build with  in main()
17 all(windows, feature = "bundled-windows") in main()
27 #[cfg(any(feature = "bundled", all(windows, feature = "bundled-windows")))] in main()
31 #[cfg(not(any(feature = "bundled", all(windows, feature = "bundled-windows"))))] in main()
38 #[cfg(any(feature = "bundled", all(windows, feature = "bundled-windows")))]
61 println!("cargo:rerun-if-changed=sqlite3/sqlite3.c"); in main()
62 println!("cargo:rerun-if-changed=sqlite3/wasm32-wasi-vfs.c"); in main()
63 let mut cfg = cc::Build::new(); in main()
65 .flag("-DSQLITE_CORE") in main()
66 .flag("-DSQLITE_DEFAULT_FOREIGN_KEYS=1") in main()
67 .flag("-DSQLITE_ENABLE_API_ARMOR") in main()
68 .flag("-DSQLITE_ENABLE_COLUMN_METADATA") in main()
69 .flag("-DSQLITE_ENABLE_DBSTAT_VTAB") in main()
70 .flag("-DSQLITE_ENABLE_FTS3") in main()
71 .flag("-DSQLITE_ENABLE_FTS3_PARENTHESIS") in main()
72 .flag("-DSQLITE_ENABLE_FTS5") in main()
73 .flag("-DSQLITE_ENABLE_JSON1") in main()
74 .flag("-DSQLITE_ENABLE_LOAD_EXTENSION=1") in main()
75 .flag("-DSQLITE_ENABLE_MEMORY_MANAGEMENT") in main()
76 .flag("-DSQLITE_ENABLE_RTREE") in main()
77 .flag("-DSQLITE_ENABLE_STAT2") in main()
78 .flag("-DSQLITE_ENABLE_STAT4") in main()
79 .flag("-DSQLITE_SOUNDEX") in main()
80 .flag("-DSQLITE_THREADSAFE=1") in main()
81 .flag("-DSQLITE_USE_URI") in main()
82 .flag("-DHAVE_USLEEP=1") in main()
83 .flag("-D_POSIX_THREAD_SAFE_FUNCTIONS") // cross compile with MinGW in main()
86 if cfg!(feature = "with-asan") { in main()
87 cfg.flag("-fsanitize=address"); in main()
91 // causes a build failure when the linker fails to find the `isnan` in main()
104 cfg.flag("-DHAVE_ISNAN"); in main()
107 cfg.flag("-DHAVE_ISNAN"); in main()
110 cfg.flag("-DHAVE_LOCALTIME_R"); in main()
112 // Target wasm32-wasi can't compile the default VFS in main()
113 if env::var("TARGET") == Ok("wasm32-wasi".to_string()) { in main()
114 cfg.flag("-DSQLITE_OS_OTHER") in main()
115 // https://github.com/rust-lang/rust/issues/74393 in main()
116 .flag("-DLONGDOUBLE_TYPE=double"); in main()
117 if cfg!(feature = "wasm32-wasi-vfs") { in main()
118 cfg.file("sqlite3/wasm32-wasi-vfs.c"); in main()
122 cfg.flag("-DSQLITE_ENABLE_UNLOCK_NOTIFY"); in main()
125 cfg.flag("-DSQLITE_ENABLE_PREUPDATE_HOOK"); in main()
128 cfg.flag("-DSQLITE_ENABLE_SESSION"); in main()
132 cfg.flag(&format!("-DSQLITE_MAX_VARIABLE_NUMBER={}", limit)); in main()
134 println!("cargo:rerun-if-env-changed=SQLITE_MAX_VARIABLE_NUMBER"); in main()
137 cfg.flag(&format!("-DSQLITE_MAX_EXPR_DEPTH={}", limit)); in main()
139 println!("cargo:rerun-if-env-changed=SQLITE_MAX_EXPR_DEPTH"); in main()
143 if extra.starts_with("-D") || extra.starts_with("-U") { in main()
146 cfg.flag(&format!("-D{}", extra)); in main()
152 println!("cargo:rerun-if-env-changed=LIBSQLITE3_FLAGS"); in main()
160 fn env_prefix() -> &'static str { in env_prefix()
175 fn from(header: HeaderLocation) -> String { in from()
207 all(windows, feature = "bundled-windows") in main()
223 fn find_link_mode() -> &'static str { in find_link_mode()
232 fn find_sqlite() -> HeaderLocation { in find_sqlite()
235 println!("cargo:rerun-if-env-changed={}_INCLUDE_DIR", env_prefix()); in find_sqlite()
236 println!("cargo:rerun-if-env-changed={}_LIB_DIR", env_prefix()); in find_sqlite()
237 println!("cargo:rerun-if-env-changed={}_STATIC", env_prefix()); in find_sqlite()
239 println!("cargo:rerun-if-env-changed=VCPKGRS_DYNAMIC"); in find_sqlite()
246 println!("cargo:link-target={}", link_lib); in find_sqlite()
249 println!("cargo:rustc-link-lib=dylib={}", link_lib); in find_sqlite()
255 // Try to use pkg-config to determine link commands in find_sqlite()
259 // Otherwise just emit the bare minimum link commands. in find_sqlite()
260 println!("cargo:rustc-link-lib={}={}", find_link_mode(), link_lib); in find_sqlite()
261 println!("cargo:rustc-link-search={}", dir); in find_sqlite()
270 // See if pkg-config can do everything for us. in find_sqlite()
284 // No env var set and pkg-config couldn't help; just output the link-lib in find_sqlite()
288 println!("cargo:rustc-link-lib={}={}", find_link_mode(), link_lib); in find_sqlite()
295 fn try_vcpkg() -> Option<HeaderLocation> { in try_vcpkg()
307 fn try_vcpkg() -> Option<HeaderLocation> { in try_vcpkg()
311 fn link_lib() -> &'static str { in link_lib()
330 "bindgen-bindings/bindgen_3.6.8.rs",
332 "bindgen-bindings/bindgen_3.6.23.rs",
334 "bindgen-bindings/bindgen_3.7.7.rs",
336 "bindgen-bindings/bindgen_3.7.16.rs",
340 let in_path = PREBUILT_BINDGEN_PATHS[PREBUILT_BINDGEN_PATHS.len() - 1]; in write_to_out_dir()
358 fn int_macro(&self, _name: &str, value: i64) -> Option<IntKind> { in int_macro()
370 fn generating_bundled_bindings() -> bool { in generating_bundled_bindings()
372 println!("cargo:rerun-if-env-changed=LIBSQLITE3_SYS_BUNDLING"); in generating_bundled_bindings()
388 bindings = bindings.clang_arg("-DSQLITE_ENABLE_UNLOCK_NOTIFY"); in write_to_out_dir()
391 bindings = bindings.clang_arg("-DSQLITE_ENABLE_PREUPDATE_HOOK"); in write_to_out_dir()
394 bindings = bindings.clang_arg("-DSQLITE_ENABLE_SESSION"); in write_to_out_dir()
398 .clang_arg("-DBINDGEN_USE_WINSQLITE3") in write_to_out_dir()
427 // When cross compiling unless effort is taken to fix the issue, bindgen in write_to_out_dir()
442 // cross compiling. in write_to_out_dir()
461 let mut output = String::from_utf8(output).expect("bindgen output was not UTF-8?!"); in write_to_out_dir()
465 // versions of SQLite is harmless. We don't want to not build just in write_to_out_dir()