Fix and re-run cargo_embargo. am: 9e0b8308ed Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/libsqlite3-sys/+/3318117 Change-Id: I4867306b3b98c6ec8e4f7d846c83afdcf9d7fec2 Signed-off-by: Automerger Merge Worker <[email protected]>
diff --git a/Android.bp b/Android.bp index 99fd9b8..8d00915 100644 --- a/Android.bp +++ b/Android.bp
@@ -1,41 +1,16 @@ // This file is generated by cargo_embargo. -// Do not modify this file after the first "rust_*" or "genrule" module -// because the changes will be overridden on upgrade. -// Content before the first "rust_*" or "genrule" module is preserved. - -// We renamed the shared_libs dependence from libsqlite3 to libsqlite. -// srcs has been moved out of _defaults to work around b/163420435 +// Do not modify this file because the changes will be overridden on upgrade. package { - default_applicable_licenses: [ - "external_rust_crates_libsqlite3-sys_license", - ], + default_applicable_licenses: ["external_rust_crates_libsqlite3-sys_license"], + default_team: "trendy_team_android_rust", } -// Added automatically by a large-scale-change that took the approach of -// 'apply every license found to every target'. While this makes sure we respect -// every license restriction, it may not be entirely correct. -// -// e.g. GPL in an MIT project might only apply to the contrib/ directory. -// -// Please consider splitting the single license below into multiple licenses, -// taking care not to lose any license_kind information, and overriding the -// default license using the 'licenses: [...]' property on targets as needed. -// -// For unused files, consider creating a 'fileGroup' with "//visibility:private" -// to attach the license to, and including a comment whether the files may be -// used in the current project. -// See: http://go/android-license-faq license { name: "external_rust_crates_libsqlite3-sys_license", visibility: [":__subpackages__"], - license_kinds: [ - "SPDX-license-identifier-MIT", - "legacy_permissive", - ], - license_text: [ - "LICENSE", - ], + license_kinds: ["SPDX-license-identifier-MIT"], + license_text: ["LICENSE"], } rust_library {
diff --git a/bindgen_modules.bp b/bindgen_modules.bp index aeb596c..970b0a0 100644 --- a/bindgen_modules.bp +++ b/bindgen_modules.bp
@@ -11,6 +11,7 @@ "//apex_available:platform", "//apex_available:anyapex", ], + product_available: true, vendor_available: true, }
diff --git a/cargo_embargo.json b/cargo_embargo.json index cf69f72..2173532 100644 --- a/cargo_embargo.json +++ b/cargo_embargo.json
@@ -1,7 +1,8 @@ { "package": { "libsqlite3-sys": { - "add_toplevel_block": "bindgen_modules.bp" + "add_toplevel_block": "bindgen_modules.bp", + "patch": "patches/Android.bp.patch" } }, "product_available": true,
diff --git a/patches/Android.bp.patch b/patches/Android.bp.patch index 832816b..80f42ea 100644 --- a/patches/Android.bp.patch +++ b/patches/Android.bp.patch
@@ -34,42 +34,3 @@ } rust_bindgen { -diff --git a/patches/Android.bp.patch b/patches/Android.bp.patch -index d4b2708..e69de29 100644 ---- a/patches/Android.bp.patch -+++ b/patches/Android.bp.patch -@@ -1,34 +0,0 @@ ----- Android.bp --+++ Android.bp --@@ -45,6 +45,7 @@ -- cargo_env_compat: true, -- cargo_pkg_version: "0.22.2", -- crate_root: "src/lib.rs", --+ srcs: [":libsqlite3_bindgen"], -- edition: "2018", -- features: [ -- "default", --@@ -52,6 +53,7 @@ -- "pkg-config", -- "vcpkg", -- ], --+ shared_libs: ["libsqlite"], -- apex_available: [ -- "//apex_available:platform", -- "//apex_available:anyapex", --@@ -65,6 +67,7 @@ -- cargo_env_compat: true, -- cargo_pkg_version: "0.22.2", -- crate_root: "src/lib.rs", --+ srcs: [":libsqlite3_bindgen"], -- test_suites: ["general-tests"], -- auto_gen_config: true, -- test_options: { --@@ -77,6 +80,7 @@ -- "pkg-config", -- "vcpkg", -- ], --+ shared_libs: ["libsqlite"], -- } -- -- rust_bindgen {