Snap for 12572747 from 31d41782d68f12085402be5fa1223c902bf2810d to build-tools-release
Change-Id: Id82bda6b403c9a6ee247b40aaadc676399d2f930
diff --git a/1.3.2/Android.bp b/1.3.2/Android.bp
index e212f90..5a11914 100644
--- a/1.3.2/Android.bp
+++ b/1.3.2/Android.bp
@@ -1,88 +1 @@
-// 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.
-
-package {
- default_applicable_licenses: ["external_rust_crates_bitflags_license"],
-}
-
-license {
- name: "external_rust_crates_bitflags_license-1.3.2",
- visibility: [":__subpackages__"],
- license_kinds: [
- "SPDX-license-identifier-Apache-2.0",
- ],
- license_text: [
- "LICENSE",
- ],
-}
-
-rust_test {
- name: "bitflags_test_src_lib-1.3.2",
- host_supported: true,
- crate_name: "bitflags",
- cargo_env_compat: true,
- cargo_pkg_version: "1.3.2",
- crate_root: "src/lib.rs",
- test_suites: ["general-tests"],
- auto_gen_config: true,
- test_options: {
- unit_test: true,
- },
- edition: "2018",
- features: ["default"],
- rustlibs: [
- "libserde",
- "libserde_json",
- "libwalkdir",
- ],
- proc_macros: [
- "librustversion",
- "libserde_derive",
- ],
-}
-
-rust_test {
- name: "bitflags_test_tests_basic-1.3.2",
- host_supported: true,
- crate_name: "basic",
- cargo_env_compat: true,
- cargo_pkg_version: "1.3.2",
- crate_root: "tests/basic.rs",
- test_suites: ["general-tests"],
- auto_gen_config: true,
- test_options: {
- unit_test: true,
- },
- edition: "2018",
- features: ["default"],
- rustlibs: [
- "libbitflags-1.3.2",
- "libserde",
- "libserde_json",
- "libwalkdir",
- ],
- proc_macros: [
- "librustversion",
- "libserde_derive",
- ],
-}
-
-rust_library {
- name: "libbitflags-1.3.2",
- host_supported: true,
- crate_name: "bitflags",
- cargo_env_compat: true,
- cargo_pkg_version: "1.3.2",
- crate_root: "src/lib.rs",
- edition: "2018",
- features: ["default"],
- apex_available: [
- "//apex_available:platform",
- "//apex_available:anyapex",
- ],
- product_available: true,
- vendor_available: true,
- min_sdk_version: "29",
-}
+// This crate has been migrated to external/rust/android-crates-io/extra_versions.
diff --git a/1.3.2/TEST_MAPPING b/1.3.2/TEST_MAPPING
deleted file mode 100644
index 342b698..0000000
--- a/1.3.2/TEST_MAPPING
+++ /dev/null
@@ -1,93 +0,0 @@
-// Generated by update_crate_tests.py for tests that depend on this crate.
-{
- "imports": [
- {
- "path": "external/rust/crates/base64"
- },
- {
- "path": "external/rust/crates/clap/2.33.3"
- },
- {
- "path": "external/rust/crates/gdbstub_arch"
- },
- {
- "path": "external/rust/crates/libsqlite3-sys"
- },
- {
- "path": "external/rust/crates/tinytemplate"
- },
- {
- "path": "external/rust/crates/tinyvec"
- },
- {
- "path": "external/rust/crates/tokio"
- },
- {
- "path": "external/rust/crates/unicode-xid"
- },
- {
- "path": "external/rust/crates/virtio-drivers"
- },
- {
- "path": "packages/modules/Virtualization/apkdmverity"
- },
- {
- "path": "packages/modules/Virtualization/authfs"
- },
- {
- "path": "packages/modules/Virtualization/avmd"
- },
- {
- "path": "packages/modules/Virtualization/encryptedstore"
- },
- {
- "path": "packages/modules/Virtualization/libs/apkverify"
- },
- {
- "path": "packages/modules/Virtualization/libs/capabilities"
- },
- {
- "path": "packages/modules/Virtualization/libs/devicemapper"
- },
- {
- "path": "packages/modules/Virtualization/microdroid_manager"
- },
- {
- "path": "packages/modules/Virtualization/virtualizationmanager"
- },
- {
- "path": "packages/modules/Virtualization/vm"
- },
- {
- "path": "packages/modules/Virtualization/zipfuse"
- },
- {
- "path": "system/security/diced"
- },
- {
- "path": "system/security/keystore2"
- },
- {
- "path": "system/security/keystore2/legacykeystore"
- },
- {
- "path": "system/security/keystore2/src/crypto"
- }
- ],
- "presubmit": [
- {
- "name": "bitflags_test_src_lib-1.3.2"
- },
- {
- "name": "bitflags_test_tests_basic-1.3.2"
- }
- ],
- "presubmit-rust": [
- {
- "name": "bitflags_test_src_lib-1.3.2"
- },
- {
- "name": "bitflags_test_tests_basic-1.3.2"
- }
- ]
-}
diff --git a/1.3.2/cargo_embargo.json b/1.3.2/cargo_embargo.json
deleted file mode 100644
index 3a41536..0000000
--- a/1.3.2/cargo_embargo.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "min_sdk_version": "29",
- "module_blocklist": [
- "bitflags_test_tests_compile"
- ],
- "module_name_overrides": {
- "bitflags_test_src_lib": "bitflags_test_src_lib-1.3.2",
- "bitflags_test_tests_basic": "bitflags_test_tests_basic-1.3.2",
- "libbitflags": "libbitflags-1.3.2"
- },
- "package": {
- "bitflags": {
- "dep_blocklist": [
- "libtrybuild"
- ]
- }
- },
- "run_cargo": false,
- "tests": true
-}
diff --git a/1.3.2/patches/Cargo.toml.patch b/1.3.2/patches/Cargo.toml.patch
index f50886a..e663728 100644
--- a/1.3.2/patches/Cargo.toml.patch
+++ b/1.3.2/patches/Cargo.toml.patch
@@ -1,7 +1,7 @@
-diff --git a/1.3.2/Cargo.toml b/1.3.2/Cargo.toml
+diff --git a/Cargo.toml b/Cargo.toml
index 9d54c72..59ad06b 100644
---- a/1.3.2/Cargo.toml
-+++ b/1.3.2/Cargo.toml
+--- a/Cargo.toml
++++ b/Cargo.toml
@@ -39,6 +39,7 @@ version = "1.0"
[dev-dependencies.serde]
diff --git a/Android.bp b/Android.bp
index 29385f9..319eb9a 100644
--- a/Android.bp
+++ b/Android.bp
@@ -3,6 +3,7 @@
package {
default_applicable_licenses: ["external_rust_crates_bitflags_license"],
+ default_team: "trendy_team_android_rust",
}
license {
@@ -28,3 +29,9 @@
vendor_available: true,
min_sdk_version: "29",
}
+
+dirgroup {
+ name: "trusty_dirgroup_external_rust_crates_bitflags",
+ visibility: ["//trusty/vendor/google/aosp/scripts"],
+ dirs: ["."],
+}
diff --git a/cargo_embargo.json b/cargo_embargo.json
index 9ce3b17..31f1605 100644
--- a/cargo_embargo.json
+++ b/cargo_embargo.json
@@ -4,8 +4,10 @@
"bitflags": {
"dep_blocklist": [
"libtrybuild"
- ]
+ ],
+ "rulesmk_patch": "patches/rules.mk.diff"
}
},
- "run_cargo": false
+ "run_cargo": false,
+ "generate_rulesmk": true
}
diff --git a/patches/rules.mk.diff b/patches/rules.mk.diff
index 47616d9..a48a449 100644
--- a/patches/rules.mk.diff
+++ b/patches/rules.mk.diff
@@ -1,14 +1,14 @@
-diff --git b/rules.mk a/rules.mk
-index ccb9711..8005071 100644
---- b/rules.mk
-+++ a/rules.mk
-@@ -8,4 +8,9 @@ MODULE_SRCS := \
- $(LOCAL_DIR)/src/lib.rs \
-
+diff --git a/rules.mk b/rules.mk
+index 71d5809..71731d8 100644
+--- a/rules.mk
++++ b/rules.mk
+@@ -10,6 +10,8 @@ MODULE_RUST_CRATE_TYPES := rlib
+ MODULE_SRCS := $(LOCAL_DIR)/src/lib.rs
MODULE_RUST_EDITION := 2021
-+MODULE_LIBRARY_DEPS := \
+ MODULE_LIBRARY_DEPS := \
+-
+ trusty/user/base/lib/libcompiler_builtins-rust \
+ trusty/user/base/lib/libcore-rust \
-+ external/rust/crates/serde \
-+
++ $(call FIND_CRATE,serde) \
+
include make/library.mk
diff --git a/rules.mk b/rules.mk
index 8005071..71731d8 100644
--- a/rules.mk
+++ b/rules.mk
@@ -1,16 +1,17 @@
-# This file is generated by cargo2rulesmk.py --run --config cargo2rulesmk.json.
-# Do not modify this file as changes will be overridden on upgrade.
+# This file is generated by cargo_embargo.
+# Do not modify this file after the LOCAL_DIR line
+# because the changes will be overridden on upgrade.
+# Content before the first line starting with LOCAL_DIR is preserved.
LOCAL_DIR := $(GET_LOCAL_DIR)
MODULE := $(LOCAL_DIR)
MODULE_CRATE_NAME := bitflags
-MODULE_SRCS := \
- $(LOCAL_DIR)/src/lib.rs \
-
+MODULE_RUST_CRATE_TYPES := rlib
+MODULE_SRCS := $(LOCAL_DIR)/src/lib.rs
MODULE_RUST_EDITION := 2021
MODULE_LIBRARY_DEPS := \
trusty/user/base/lib/libcompiler_builtins-rust \
trusty/user/base/lib/libcore-rust \
- external/rust/crates/serde \
+ $(call FIND_CRATE,serde) \
include make/library.mk