diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2021-04-22 01:05:11 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2021-04-22 01:05:11 +0000 |
commit | 1f3e8caf389f233c3b28cd016a6fa86d4671f6ac (patch) | |
tree | 5893099480ba2ed264eb1a7c609f2e533a00af0e | |
parent | 757afe1ec29c2d1d84095ee0f146651451868d9d (diff) | |
parent | 1100964ebe91a780f27b9a8de94b2f56f092b5c6 (diff) | |
download | libsqlite3-sys-1f3e8caf389f233c3b28cd016a6fa86d4671f6ac.tar.gz |
Snap for 7302914 from 1100964ebe91a780f27b9a8de94b2f56f092b5c6 to sc-d1-releaseandroid-12.0.0_r7android-12.0.0_r6android-12.0.0_r5android-12.0.0_r4android-12.0.0_r15android-12.0.0_r14android-12.0.0_r13android-12.0.0_r12android12-d1-s6-releaseandroid12-d1-s5-releaseandroid12-d1-s4-releaseandroid12-d1-s3-releaseandroid12-d1-s2-releaseandroid12-d1-s1-releaseandroid12-d1-release
Change-Id: If8836b1d1cc8c3c673c8f223b8ca1d5492e74498
-rw-r--r-- | Android.bp | 39 | ||||
-rw-r--r-- | TEST_MAPPING | 8 | ||||
-rw-r--r-- | patches/Android.bp.patch | 57 |
3 files changed, 24 insertions, 80 deletions
@@ -1,4 +1,5 @@ // This file is generated by cargo2android.py --device --run --dependencies --test --patch=patches/Android.bp.patch. +// Do not modify this file as changes will be overridden on upgrade. // We renamed the shared_libs dependence from libsqlite3 to libsqlite. // srcs has been moved out of _defaults to work around b/163420435 @@ -79,6 +80,9 @@ rust_test_host { ":libsqlite3_bindgen", ], defaults: ["libsqlite3-sys_defaults"], + test_options: { + unit_test: true, + }, } rust_test { @@ -93,38 +97,6 @@ rust_test { // dependent_library ["feature_list"] // pkg-config-0.3.19 -// Keep this array in sync with the cflags used in external/sqlite -// After b/163598610 is resolved, use defaults instead. -sqlite3_bindgen_clang_flags = [ - " -DNDEBUG=1", - " -DHAVE_USLEEP=1", - " -DSQLITE_HAVE_ISNAN", - " -DSQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=1048576", - " -DSQLITE_THREADSAFE=2", - " -DSQLITE_TEMP_STORE=3", - " -DSQLITE_POWERSAFE_OVERWRITE=1", - " -DSQLITE_DEFAULT_FILE_FORMAT=4", - " -DSQLITE_DEFAULT_AUTOVACUUM=1", - " -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1", - " -DSQLITE_ENABLE_FTS3", - " -DSQLITE_ENABLE_FTS3_BACKWARDS", - " -DSQLITE_ENABLE_FTS4", - " -DSQLITE_OMIT_BUILTIN_TEST", - " -DSQLITE_OMIT_COMPILEOPTION_DIAGS", - " -DSQLITE_OMIT_LOAD_EXTENSION", - " -DSQLITE_DEFAULT_FILE_PERMISSIONS=0600", - " -DSQLITE_SECURE_DELETE", - " -DSQLITE_ENABLE_BATCH_ATOMIC_WRITE", - " -DBIONIC_IOCTL_NO_SIGNEDNESS_OVERLOAD", - " -DHAVE_POSIX_FALLOCATE=1", - // extra -D flags for android targets - " -DUSE_PREAD64", - " -Dfdatasync=fdatasync", - " -DHAVE_MALLOC_H=1", - " -DHAVE_MALLOC_USABLE_SIZE", - " -Wno-unused-parameter", -] - rust_bindgen { name: "libsqlite3_bindgen", host_supported: true, @@ -132,5 +104,6 @@ rust_bindgen { custom_bindgen: "sqlite3_bindgen_build", wrapper_src: "wrapper.h", source_stem: "bindgen", - cflags: ["-I external/sqlite/dist"] + sqlite3_bindgen_clang_flags, + cflags: ["-I external/sqlite/dist"], + defaults: ["sqlite-defaults"], } diff --git a/TEST_MAPPING b/TEST_MAPPING index 6716814..a731acb 100644 --- a/TEST_MAPPING +++ b/TEST_MAPPING @@ -1,8 +1,14 @@ -// Generated by cargo2android.py for tests in Android.bp +// Generated by update_crate_tests.py for tests that depend on this crate. { "presubmit": [ { + "name": "keystore2_test" + }, + { "name": "libsqlite3-sys_device_test_src_lib" + }, + { + "name": "vpnprofilestore_test" } ] } diff --git a/patches/Android.bp.patch b/patches/Android.bp.patch index 0a2d5c3..0b9b65e 100644 --- a/patches/Android.bp.patch +++ b/patches/Android.bp.patch @@ -1,12 +1,6 @@ ---- Android.bp 2020-10-30 16:41:52.854552104 -0700 -+++ Android.bp 2020-10-30 16:47:00.153323579 -0700 -@@ -1,10 +1,16 @@ - // This file is generated by cargo2android.py --device --run --dependencies --test --patch=patches/Android.bp.patch. - -+// We renamed the shared_libs dependence from libsqlite3 to libsqlite. -+// srcs has been moved out of _defaults to work around b/163420435 -+ - rust_library { +--- Android.bp 2021-04-14 17:32:44.882379059 +0000 ++++ Android.bp 2021-04-14 17:33:25.765957305 +0000 +@@ -40,7 +40,10 @@ name: "liblibsqlite3_sys", host_supported: true, crate_name: "libsqlite3_sys", @@ -18,7 +12,7 @@ edition: "2018", features: [ "default", -@@ -12,13 +18,14 @@ +@@ -48,13 +51,14 @@ "pkg-config", "vcpkg", ], @@ -35,7 +29,7 @@ test_suites: ["general-tests"], auto_gen_config: true, edition: "2018", -@@ -28,23 +35,70 @@ +@@ -64,11 +68,17 @@ "pkg-config", "vcpkg", ], @@ -52,7 +46,9 @@ + ":libsqlite3_bindgen", + ], defaults: ["libsqlite3-sys_defaults"], - } + test_options: { + unit_test: true, +@@ -77,13 +87,23 @@ rust_test { name: "libsqlite3-sys_device_test_src_lib", @@ -69,39 +65,7 @@ -Errors in cargo.out: -error: linking with `cc` failed: exit code: 1 -error: aborting due to previous error --error: could not compile `libsqlite3-sys`. -+// Keep this array in sync with the cflags used in external/sqlite -+// After b/163598610 is resolved, use defaults instead. -+sqlite3_bindgen_clang_flags = [ -+ " -DNDEBUG=1", -+ " -DHAVE_USLEEP=1", -+ " -DSQLITE_HAVE_ISNAN", -+ " -DSQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=1048576", -+ " -DSQLITE_THREADSAFE=2", -+ " -DSQLITE_TEMP_STORE=3", -+ " -DSQLITE_POWERSAFE_OVERWRITE=1", -+ " -DSQLITE_DEFAULT_FILE_FORMAT=4", -+ " -DSQLITE_DEFAULT_AUTOVACUUM=1", -+ " -DSQLITE_ENABLE_MEMORY_MANAGEMENT=1", -+ " -DSQLITE_ENABLE_FTS3", -+ " -DSQLITE_ENABLE_FTS3_BACKWARDS", -+ " -DSQLITE_ENABLE_FTS4", -+ " -DSQLITE_OMIT_BUILTIN_TEST", -+ " -DSQLITE_OMIT_COMPILEOPTION_DIAGS", -+ " -DSQLITE_OMIT_LOAD_EXTENSION", -+ " -DSQLITE_DEFAULT_FILE_PERMISSIONS=0600", -+ " -DSQLITE_SECURE_DELETE", -+ " -DSQLITE_ENABLE_BATCH_ATOMIC_WRITE", -+ " -DBIONIC_IOCTL_NO_SIGNEDNESS_OVERLOAD", -+ " -DHAVE_POSIX_FALLOCATE=1", -+ // extra -D flags for android targets -+ " -DUSE_PREAD64", -+ " -Dfdatasync=fdatasync", -+ " -DHAVE_MALLOC_H=1", -+ " -DHAVE_MALLOC_USABLE_SIZE", -+ " -Wno-unused-parameter", -+] -+ +-error: could not compile `libsqlite3-sys` +rust_bindgen { + name: "libsqlite3_bindgen", + host_supported: true, @@ -109,5 +73,6 @@ + custom_bindgen: "sqlite3_bindgen_build", + wrapper_src: "wrapper.h", + source_stem: "bindgen", -+ cflags: ["-I external/sqlite/dist"] + sqlite3_bindgen_clang_flags, ++ cflags: ["-I external/sqlite/dist"], ++ defaults: ["sqlite-defaults"], +} |