Use SQLITE_TEMP_STORE=3 on android. (#937)

This commit is contained in:
David Craven 2021-04-16 19:27:59 +02:00 committed by GitHub
parent ddf69f749a
commit 3519aef29f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -83,6 +83,13 @@ mod build_bundled {
.flag("-D_POSIX_THREAD_SAFE_FUNCTIONS") // cross compile with MinGW .flag("-D_POSIX_THREAD_SAFE_FUNCTIONS") // cross compile with MinGW
.warnings(false); .warnings(false);
// on android sqlite can't figure out where to put the temp files.
// the bundled sqlite on android also uses `SQLITE_TEMP_STORE=3`.
// https://android.googlesource.com/platform/external/sqlite/+/2c8c9ae3b7e6f340a19a0001c2a889a211c9d8b2/dist/Android.mk
if cfg!(target_os = "android") {
cfg.flag("-DSQLITE_TEMP_STORE=3");
}
if cfg!(feature = "with-asan") { if cfg!(feature = "with-asan") {
cfg.flag("-fsanitize=address"); cfg.flag("-fsanitize=address");
} }