Newer
Older
// This file is generated by cargo2android.py --config cargo2android.json.
// Do not modify this file as changes will be overridden on upgrade.
package {
default_applicable_licenses: ["external_rust_crates_ring_license"],
}
// 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_ring_license",
visibility: [":__subpackages__"],
license_kinds: [
"SPDX-license-identifier-BSD",
"SPDX-license-identifier-ISC",
"SPDX-license-identifier-MIT",
"SPDX-license-identifier-OpenSSL",
"legacy_unencumbered",
],
license_text: [
"LICENSE",
],
}
host_supported: true,
crate_name: "ring",
cargo_env_compat: true,
srcs: ["src/lib.rs"],
edition: "2018",
features: [
"alloc",
"default",
"dev_urandom_fallback",
"once_cell",
],
rustlibs: [
"liblibc",
"libonce_cell",
"libspin",
"libuntrusted",
],
whole_static_libs: [
"libring-core",
"libring-test",
apex_available: [
"//apex_available:platform",
"com.android.resolv",
],
min_sdk_version: "29",
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
rust_library_rlib {
name: "libring_nostd",
// has rustc warnings
crate_name: "ring",
cargo_env_compat: true,
cargo_pkg_version: "0.17.0-alpha.11",
srcs: ["src/lib.rs"],
edition: "2018",
features: ["once_cell"],
rustlibs: [
"liblibc",
"libonce_cell",
"libspin_nostd",
"libuntrusted",
],
whole_static_libs: [
"libring-core",
"libring-test",
],
apex_available: [
"//apex_available:platform",
"com.android.resolv",
],
prefer_rlib: true,
no_stdlibs: true,
stdlibs: [
"libcompiler_builtins.rust_sysroot",
"libcore.rust_sysroot",
],
product_available: true,
vendor_available: true,
min_sdk_version: "29",
rust_test {
name: "ring_test_src_lib",
host_supported: true,
cargo_env_compat: true,
srcs: ["src/lib.rs"],
test_suites: ["general-tests"],
auto_gen_config: true,
test_options: {
unit_test: true,
},
"alloc",
"default",
"dev_urandom_fallback",
"once_cell",
],
rustlibs: [
"liblibc",
"libonce_cell",
"libspin",
"libuntrusted",
],
whole_static_libs: [
"libring-core",
"libring-test",
name: "ring_test_defaults",
cargo_env_compat: true,
test_suites: ["general-tests"],
auto_gen_config: true,
edition: "2018",
features: [
"alloc",
"default",
"dev_urandom_fallback",
"once_cell",
],
rustlibs: [
"liblibc",
"libonce_cell",
"libring",
"libspin",
"libuntrusted",
],
}
rust_test {
name: "ring_test_tests_aead_tests",
defaults: ["ring_test_defaults"],
host_supported: true,
name: "ring_test_tests_agreement_tests",
defaults: ["ring_test_defaults"],
host_supported: true,
name: "ring_test_tests_constant_time_tests",
defaults: ["ring_test_defaults"],
host_supported: true,
name: "ring_test_tests_digest_tests",
defaults: ["ring_test_defaults"],
host_supported: true,
name: "ring_test_tests_ecdsa_tests",
defaults: ["ring_test_defaults"],
host_supported: true,
name: "ring_test_tests_ed25519_tests",
defaults: ["ring_test_defaults"],
host_supported: true,
name: "ring_test_tests_hkdf_tests",
defaults: ["ring_test_defaults"],
host_supported: true,
name: "ring_test_tests_hmac_tests",
defaults: ["ring_test_defaults"],
host_supported: true,
name: "ring_test_tests_pbkdf2_tests",
defaults: ["ring_test_defaults"],
host_supported: true,
name: "ring_test_tests_quic_tests",
defaults: ["ring_test_defaults"],
host_supported: true,
name: "ring_test_tests_rand_tests",
defaults: ["ring_test_defaults"],
host_supported: true,
name: "ring_test_tests_rsa_tests",
defaults: ["ring_test_defaults"],
host_supported: true,
name: "ring_test_tests_signature_tests",
defaults: ["ring_test_defaults"],
host_supported: true,
cc_library_static {
name: "libring-core",
host_supported: true,
srcs: [
"crypto/cpu-intel.c",
"crypto/fipsmodule/aes/aes_nohw.c",
"crypto/crypto.c",
"crypto/poly1305/poly1305.c",
"crypto/poly1305/poly1305_vec.c",
"crypto/curve25519/curve25519.c",
"crypto/fipsmodule/ec/ecp_nistz.c",
"crypto/fipsmodule/ec/gfp_p256.c",
"crypto/fipsmodule/ec/gfp_p384.c",
"crypto/fipsmodule/ec/p256.c",
"crypto/fipsmodule/rsa/padding.c",
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
"crypto/limbs/limbs.c",
"crypto/mem.c",
"crypto/fipsmodule/bn/montgomery.c",
"crypto/fipsmodule/bn/montgomery_inv.c",
],
arch: {
arm: {
srcs: [
"crypto/poly1305/poly1305_arm.c",
"crypto/poly1305/poly1305_arm_asm.S",
"pregenerated/armv4-mont-linux32.S",
"crypto/curve25519/asm/x25519-asm-arm.S",
"pregenerated/sha256-armv4-linux32.S",
"pregenerated/sha512-armv4-linux32.S",
"pregenerated/aesv8-armx-linux32.S",
"pregenerated/bsaes-armv7-linux32.S",
"pregenerated/ghashv8-armx-linux32.S",
"pregenerated/vpaes-armv7-linux32.S",
"pregenerated/ghash-armv4-linux32.S",
"pregenerated/chacha-armv4-linux32.S",
],
},
arm64: {
srcs: [
"pregenerated/aesv8-armx-linux64.S",
"pregenerated/armv8-mont-linux64.S",
"pregenerated/chacha-armv8-linux64.S",
"pregenerated/ghash-neon-armv8-linux64.S",
"pregenerated/ghashv8-armx-linux64.S",
"pregenerated/sha256-armv8-linux64.S",
"pregenerated/sha512-armv8-linux64.S",
"pregenerated/vpaes-armv8-linux64.S",
],
},
x86: {
srcs: [
"pregenerated/aesni-x86-elf.S",
"pregenerated/chacha-x86-elf.S",
"pregenerated/ghash-x86-elf.S",
"pregenerated/vpaes-x86-elf.S",
"pregenerated/x86-mont-elf.S",
],
},
x86_64: {
srcs: [
"crypto/fipsmodule/ec/p256-x86_64.c",
"pregenerated/aesni-gcm-x86_64-elf.S",
"pregenerated/aesni-x86_64-elf.S",
"pregenerated/chacha-x86_64-elf.S",
"pregenerated/chacha20_poly1305_x86_64-elf.S",
"pregenerated/ghash-x86_64-elf.S",
"pregenerated/p256-x86_64-asm-elf.S",
"pregenerated/sha256-x86_64-elf.S",
"pregenerated/sha512-x86_64-elf.S",
"pregenerated/vpaes-x86_64-elf.S",
"pregenerated/x86_64-mont5-elf.S",
"pregenerated/x86_64-mont-elf.S",
],
},
riscv64: {
cflags: ["-DOPENSSL_NO_ASM"],
},
},
cflags: [
"-O3",
"-Wno-error",
"-fPIC",
"-fdata-sections",
"-ffunction-sections",
"-fno-omit-frame-pointer",
"-fno-strict-aliasing",
"-fstack-protector",
"-fvisibility=hidden",
"-DNDEBUG",
],
local_include_dirs: ["include"],
apex_available: [
"//apex_available:platform",
"com.android.resolv",
],
vendor_available: true,
product_available: true,
min_sdk_version: "29",
}
cc_library_static {
name: "libring-test",
host_supported: true,
srcs: [
"crypto/constant_time_test.c",
],
local_include_dirs: ["include"],
apex_available: [
"//apex_available:platform",
"com.android.resolv",
],
vendor_available: true,
product_available: true,