aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Walbran <qwandor@google.com>2023-11-16 13:29:22 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-11-16 13:29:22 +0000
commit1d76ec7ffffbadcda63a61378a6ef0931359740f (patch)
treed5fd89f0283b42e6080e5697b31d8f259b0eaafe
parent854f58a3877d625a361be17c4d40354366163d61 (diff)
parentc8abab27370894a09bd44c77a20423713b184a05 (diff)
downloadnum-bigint-1d76ec7ffffbadcda63a61378a6ef0931359740f.tar.gz
Migrate to cargo_embargo. am: b2d25edee0 am: c8abab2737
Original change: https://android-review.googlesource.com/c/platform/external/rust/crates/num-bigint/+/2832574 Change-Id: If94f40d850bbe4a20d60e1340b34b5d2ec4d5505 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--Android.bp169
-rw-r--r--cargo2android.json14
-rw-r--r--cargo_embargo.json16
-rw-r--r--out/probe0.ll6
-rw-r--r--out/probe1.ll6
-rw-r--r--out/probe2.ll6
-rw-r--r--out/probe3.ll6
7 files changed, 173 insertions, 50 deletions
diff --git a/Android.bp b/Android.bp
index f0978cd..611412d 100644
--- a/Android.bp
+++ b/Android.bp
@@ -1,4 +1,4 @@
-// This file is generated by cargo2android.py --config cargo2android.json.
+// This file is generated by cargo_embargo.
// Do not modify this file as changes will be overridden on upgrade.
package {
@@ -112,13 +112,21 @@ rust_test {
],
}
-rust_defaults {
- name: "num-bigint_test_defaults",
- crate_name: "num_bigint",
+rust_test {
+ name: "num-bigint_test_tests_bigint",
+ host_supported: true,
+ crate_name: "bigint",
cargo_env_compat: true,
cargo_pkg_version: "0.4.3",
+ srcs: [
+ "tests/bigint.rs",
+ ":copy_num-bigint_build_out",
+ ],
test_suites: ["general-tests"],
auto_gen_config: true,
+ test_options: {
+ unit_test: true,
+ },
edition: "2018",
features: [
"default",
@@ -136,105 +144,218 @@ rust_defaults {
}
rust_test {
- name: "num-bigint_test_tests_bigint",
- defaults: ["num-bigint_test_defaults"],
- host_supported: true,
- srcs: [
- "tests/bigint.rs",
- ":copy_num-bigint_build_out",
- ],
- test_options: {
- unit_test: true,
- },
-}
-
-rust_test {
name: "num-bigint_test_tests_bigint_bitwise",
- defaults: ["num-bigint_test_defaults"],
host_supported: true,
+ crate_name: "bigint_bitwise",
+ cargo_env_compat: true,
+ cargo_pkg_version: "0.4.3",
srcs: [
"tests/bigint_bitwise.rs",
":copy_num-bigint_build_out",
],
+ test_suites: ["general-tests"],
+ auto_gen_config: true,
test_options: {
unit_test: true,
},
+ edition: "2018",
+ features: [
+ "default",
+ "std",
+ ],
+ cfgs: [
+ "has_try_from",
+ "u64_digit",
+ ],
+ rustlibs: [
+ "libnum_bigint",
+ "libnum_integer",
+ "libnum_traits",
+ ],
}
rust_test {
name: "num-bigint_test_tests_bigint_scalar",
- defaults: ["num-bigint_test_defaults"],
host_supported: true,
+ crate_name: "bigint_scalar",
+ cargo_env_compat: true,
+ cargo_pkg_version: "0.4.3",
srcs: [
"tests/bigint_scalar.rs",
":copy_num-bigint_build_out",
],
+ test_suites: ["general-tests"],
+ auto_gen_config: true,
test_options: {
unit_test: true,
},
+ edition: "2018",
+ features: [
+ "default",
+ "std",
+ ],
+ cfgs: [
+ "has_try_from",
+ "u64_digit",
+ ],
+ rustlibs: [
+ "libnum_bigint",
+ "libnum_integer",
+ "libnum_traits",
+ ],
}
rust_test {
name: "num-bigint_test_tests_biguint",
- defaults: ["num-bigint_test_defaults"],
host_supported: true,
+ crate_name: "biguint",
+ cargo_env_compat: true,
+ cargo_pkg_version: "0.4.3",
srcs: [
"tests/biguint.rs",
":copy_num-bigint_build_out",
],
+ test_suites: ["general-tests"],
+ auto_gen_config: true,
test_options: {
unit_test: true,
},
+ edition: "2018",
+ features: [
+ "default",
+ "std",
+ ],
+ cfgs: [
+ "has_try_from",
+ "u64_digit",
+ ],
+ rustlibs: [
+ "libnum_bigint",
+ "libnum_integer",
+ "libnum_traits",
+ ],
}
rust_test {
name: "num-bigint_test_tests_biguint_scalar",
- defaults: ["num-bigint_test_defaults"],
host_supported: true,
+ crate_name: "biguint_scalar",
+ cargo_env_compat: true,
+ cargo_pkg_version: "0.4.3",
srcs: [
"tests/biguint_scalar.rs",
":copy_num-bigint_build_out",
],
+ test_suites: ["general-tests"],
+ auto_gen_config: true,
test_options: {
unit_test: true,
},
+ edition: "2018",
+ features: [
+ "default",
+ "std",
+ ],
+ cfgs: [
+ "has_try_from",
+ "u64_digit",
+ ],
+ rustlibs: [
+ "libnum_bigint",
+ "libnum_integer",
+ "libnum_traits",
+ ],
}
rust_test {
name: "num-bigint_test_tests_fuzzed",
- defaults: ["num-bigint_test_defaults"],
host_supported: true,
+ crate_name: "fuzzed",
+ cargo_env_compat: true,
+ cargo_pkg_version: "0.4.3",
srcs: [
"tests/fuzzed.rs",
":copy_num-bigint_build_out",
],
+ test_suites: ["general-tests"],
+ auto_gen_config: true,
test_options: {
unit_test: true,
},
+ edition: "2018",
+ features: [
+ "default",
+ "std",
+ ],
+ cfgs: [
+ "has_try_from",
+ "u64_digit",
+ ],
+ rustlibs: [
+ "libnum_bigint",
+ "libnum_integer",
+ "libnum_traits",
+ ],
}
rust_test {
name: "num-bigint_test_tests_modpow",
- defaults: ["num-bigint_test_defaults"],
host_supported: true,
+ crate_name: "modpow",
+ cargo_env_compat: true,
+ cargo_pkg_version: "0.4.3",
srcs: [
"tests/modpow.rs",
":copy_num-bigint_build_out",
],
+ test_suites: ["general-tests"],
+ auto_gen_config: true,
test_options: {
unit_test: true,
},
+ edition: "2018",
+ features: [
+ "default",
+ "std",
+ ],
+ cfgs: [
+ "has_try_from",
+ "u64_digit",
+ ],
+ rustlibs: [
+ "libnum_bigint",
+ "libnum_integer",
+ "libnum_traits",
+ ],
}
rust_test {
name: "num-bigint_test_tests_roots",
- defaults: ["num-bigint_test_defaults"],
host_supported: true,
+ crate_name: "roots",
+ cargo_env_compat: true,
+ cargo_pkg_version: "0.4.3",
srcs: [
"tests/roots.rs",
":copy_num-bigint_build_out",
],
+ test_suites: ["general-tests"],
+ auto_gen_config: true,
test_options: {
unit_test: true,
},
+ edition: "2018",
+ features: [
+ "default",
+ "std",
+ ],
+ cfgs: [
+ "has_try_from",
+ "u64_digit",
+ ],
+ rustlibs: [
+ "libnum_bigint",
+ "libnum_integer",
+ "libnum_traits",
+ ],
}
diff --git a/cargo2android.json b/cargo2android.json
deleted file mode 100644
index bca4394..0000000
--- a/cargo2android.json
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "apex-available": [
- "//apex_available:platform",
- "com.android.virt"
- ],
- "cfg-blocklist": [
- "use_addcarry"
- ],
- "copy-out": true,
- "device": true,
- "run": true,
- "tests": true,
- "vendor-available": true
-}
diff --git a/cargo_embargo.json b/cargo_embargo.json
new file mode 100644
index 0000000..29ed98c
--- /dev/null
+++ b/cargo_embargo.json
@@ -0,0 +1,16 @@
+{
+ "apex_available": [
+ "//apex_available:platform",
+ "com.android.virt"
+ ],
+ "cfg_blocklist": [
+ "use_addcarry"
+ ],
+ "package": {
+ "num-bigint": {
+ // Code generated by build.rs is built into the library.
+ "copy_out": true
+ }
+ },
+ "tests": true
+}
diff --git a/out/probe0.ll b/out/probe0.ll
index 32a1844..2caa464 100644
--- a/out/probe0.ll
+++ b/out/probe0.ll
@@ -1,9 +1,9 @@
-; ModuleID = 'probe0.77f1aead-cgu.0'
-source_filename = "probe0.77f1aead-cgu.0"
+; ModuleID = 'probe0.cb193764fe6a59bf-cgu.0'
+source_filename = "probe0.cb193764fe6a59bf-cgu.0"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
!llvm.module.flags = !{!0, !1}
-!0 = !{i32 7, !"PIC Level", i32 2}
+!0 = !{i32 8, !"PIC Level", i32 2}
!1 = !{i32 2, !"RtLibUseGOT", i32 1}
diff --git a/out/probe1.ll b/out/probe1.ll
index b46361b..0542724 100644
--- a/out/probe1.ll
+++ b/out/probe1.ll
@@ -1,9 +1,9 @@
-; ModuleID = 'probe1.75b01371-cgu.0'
-source_filename = "probe1.75b01371-cgu.0"
+; ModuleID = 'probe1.2bff0dfac3348e8e-cgu.0'
+source_filename = "probe1.2bff0dfac3348e8e-cgu.0"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
!llvm.module.flags = !{!0, !1}
-!0 = !{i32 7, !"PIC Level", i32 2}
+!0 = !{i32 8, !"PIC Level", i32 2}
!1 = !{i32 2, !"RtLibUseGOT", i32 1}
diff --git a/out/probe2.ll b/out/probe2.ll
index 0115ea8..49f9752 100644
--- a/out/probe2.ll
+++ b/out/probe2.ll
@@ -1,9 +1,9 @@
-; ModuleID = 'probe2.07e5c90d-cgu.0'
-source_filename = "probe2.07e5c90d-cgu.0"
+; ModuleID = 'probe2.4761aca40dff6533-cgu.0'
+source_filename = "probe2.4761aca40dff6533-cgu.0"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
!llvm.module.flags = !{!0, !1}
-!0 = !{i32 7, !"PIC Level", i32 2}
+!0 = !{i32 8, !"PIC Level", i32 2}
!1 = !{i32 2, !"RtLibUseGOT", i32 1}
diff --git a/out/probe3.ll b/out/probe3.ll
index c9fa5aa..3259da1 100644
--- a/out/probe3.ll
+++ b/out/probe3.ll
@@ -1,9 +1,9 @@
-; ModuleID = 'probe3.f9c981a2-cgu.0'
-source_filename = "probe3.f9c981a2-cgu.0"
+; ModuleID = 'probe3.7ceaed51021b51ba-cgu.0'
+source_filename = "probe3.7ceaed51021b51ba-cgu.0"
target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-unknown-linux-gnu"
!llvm.module.flags = !{!0, !1}
-!0 = !{i32 7, !"PIC Level", i32 2}
+!0 = !{i32 8, !"PIC Level", i32 2}
!1 = !{i32 2, !"RtLibUseGOT", i32 1}