1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 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 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 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 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863
|
// Note that some host libraries have the same module name as the target
// libraries. This is currently needed to build, for example, adb. But it's
// probably something that should be changed.
package {
default_visibility: ["//visibility:private"],
default_applicable_licenses: ["external_boringssl_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_boringssl_license",
visibility: [":__subpackages__"],
license_kinds: [
"SPDX-license-identifier-Apache-2.0",
"SPDX-license-identifier-BSD",
"SPDX-license-identifier-ISC",
"SPDX-license-identifier-MIT",
"SPDX-license-identifier-OpenSSL",
"legacy_unencumbered",
],
license_text: [
"NOTICE",
],
}
// Pull in the autogenerated sources modules
build = ["sources.bp"]
// Used by libcrypto, libssl, bssl tool, and native tests
cc_defaults {
name: "boringssl_flags",
vendor_available: true,
product_available: true,
cflags: [
"-fvisibility=hidden",
"-DBORINGSSL_SHARED_LIBRARY",
"-DBORINGSSL_ANDROID_SYSTEM",
"-DOPENSSL_SMALL",
"-Werror",
"-Wno-unused-parameter",
],
cppflags: [
"-Wall",
"-Werror",
],
// Build BoringSSL and its tests against the same STL.
sdk_version: "9",
stl: "libc++_static",
}
// Used by libcrypto + libssl
cc_defaults {
name: "boringssl_defaults",
local_include_dirs: ["src/include"],
export_include_dirs: ["src/include"],
cflags: ["-DBORINGSSL_IMPLEMENTATION"],
}
//// libcrypto
cc_defaults {
name: "libcrypto_defaults",
host_supported: true,
ramdisk_available: true,
vendor_ramdisk_available: true,
// Windows and Macs both have problems with assembly files
target: {
windows: {
enabled: true,
cflags: ["-DOPENSSL_NO_ASM"],
host_ldlibs: ["-lws2_32"],
},
darwin: {
cflags: ["-DOPENSSL_NO_ASM"],
},
host: {
host_ldlibs: ["-lpthread"],
},
android: {
// On FIPS builds (i.e. Android only) prevent other libraries
// from pre-empting symbols in libcrypto which could affect FIPS
// compliance and cause integrity checks to fail. See b/160231064.
ldflags: ["-Wl,-Bsymbolic"],
},
},
local_include_dirs: ["src/crypto"],
stl: "none",
}
// Boring Crypto Module object file.
// Any changes here must also be reflected in bcm_object_for_testing below.
cc_object {
name: "bcm_object",
device_supported: true,
recovery_available: true,
native_bridge_supported: true,
defaults: [
"libcrypto_bcm_sources",
"libcrypto_defaults",
"boringssl_defaults",
"boringssl_flags",
],
sanitize: {
address: false,
hwaddress: false,
memtag_stack: false,
fuzzer: false,
},
target: {
android: {
cflags: [
"-DBORINGSSL_FIPS",
"-fPIC",
// -fno[data|text]-sections required to ensure a
// single text and data section for FIPS integrity check
"-fno-data-sections",
"-fno-function-sections",
],
linker_script: "src/crypto/fipsmodule/fips_shared.lds",
},
// Temporary hack to let BoringSSL build with a new compiler.
// This doesn't enable HWASAN unconditionally, it just causes
// BoringSSL's asm code to unconditionally use a HWASAN-compatible
// global variable reference so that the non-HWASANified (because of
// sanitize: { hwaddress: false } above) code in the BCM can
// successfully link against the HWASANified code in the rest of
// BoringSSL in HWASAN builds.
android_arm64: {
asflags: [
"-fsanitize=hwaddress",
],
},
},
apex_available: [
"//apex_available:platform",
"com.android.adbd",
"com.android.adservices",
"com.android.art",
"com.android.art.debug",
"com.android.art.testing",
"com.android.btservices",
"com.android.compos",
"com.android.conscrypt",
"com.android.extservices",
"com.android.resolv",
"com.android.virt",
],
min_sdk_version: "29",
}
// Version of bcm_object built with BORINGSSL_FIPS_BREAK_TESTS defined.
// Only for use with the FIPS break-tests.sh script.
// Must be kept in sync with bcm_object.
cc_object {
name: "bcm_object_for_testing",
visibility: [
"//external/boringssl",
],
device_supported: true,
defaults: [
"libcrypto_bcm_sources",
"libcrypto_defaults",
"boringssl_defaults",
"boringssl_flags",
],
sanitize: {
address: false,
hwaddress: false,
fuzzer: false,
},
target: {
android: {
cflags: [
"-DBORINGSSL_FIPS",
"-DBORINGSSL_FIPS_BREAK_TESTS",
"-fPIC",
// -fno[data|text]-sections required to ensure a
// single text and data section for FIPS integrity check
"-fno-data-sections",
"-fno-function-sections",
],
linker_script: "src/crypto/fipsmodule/fips_shared.lds",
},
// Temporary hack to let BoringSSL build with a new compiler.
// This doesn't enable HWASAN unconditionally, it just causes
// BoringSSL's asm code to unconditionally use a HWASAN-compatible
// global variable reference so that the non-HWASANified (because of
// sanitize: { hwaddress: false } above) code in the BCM can
// successfully link against the HWASANified code in the rest of
// BoringSSL in HWASAN builds.
android_arm64: {
asflags: [
"-fsanitize=hwaddress",
],
},
},
min_sdk_version: "29",
}
bootstrap_go_package {
name: "bssl_ar",
pkgPath: "boringssl.googlesource.com/boringssl/util/ar",
srcs: [
"src/util/ar/ar.go",
],
testSrcs: [
"src/util/ar/ar_test.go",
],
}
bootstrap_go_package {
name: "bssl_fipscommon",
pkgPath: "boringssl.googlesource.com/boringssl/util/fipstools/fipscommon",
srcs: [
"src/util/fipstools/fipscommon/const.go",
],
}
blueprint_go_binary {
name: "bssl_inject_hash",
srcs: [
"src/util/fipstools/inject_hash/inject_hash.go",
],
deps: [
"bssl_ar",
"bssl_fipscommon",
],
}
// Target and host library.
// Any changes here must also be reflected in libcrypto_for_test below.
cc_library {
name: "libcrypto",
visibility: ["//visibility:public"],
vendor_available: true,
product_available: true,
native_bridge_supported: true,
vndk: {
enabled: true,
},
double_loadable: true,
recovery_available: true,
defaults: [
"libcrypto_sources",
"libcrypto_defaults",
"boringssl_defaults",
"boringssl_flags",
],
unique_host_soname: true,
srcs: [
":bcm_object",
],
target: {
android: {
cflags: [
"-DBORINGSSL_FIPS",
],
sanitize: {
// Disable address sanitizing otherwise libcrypto will not report
// itself as being in FIPS mode, which causes boringssl_self_test
// to fail.
address: false,
},
inject_bssl_hash: true,
static: {
// Disable the static version of libcrypto, as it causes
// problems for FIPS certification. Use libcrypto_static for
// modules that need static libcrypto but do not need FIPS self
// testing, or use dynamic libcrypto.
enabled: false,
},
},
},
apex_available: [
"//apex_available:platform",
"com.android.adbd",
"com.android.adservices",
"com.android.art",
"com.android.art.debug",
"com.android.art.testing",
"com.android.btservices",
"com.android.compos",
"com.android.conscrypt",
"com.android.extservices",
"com.android.resolv",
"com.android.virt",
],
min_sdk_version: "29",
}
// Version of libcrypto build with BORINGSSL_FIPS_BREAK_TESTS defined
// Only for use with the FIPS break-tests.sh script.
// Must be kept in sync with libcrypto.
cc_library {
name: "libcrypto_for_testing",
visibility: [
"//external/boringssl",
],
defaults: [
"libcrypto_sources",
"libcrypto_defaults",
"boringssl_defaults",
"boringssl_flags",
],
unique_host_soname: true,
srcs: [
":bcm_object_for_testing",
],
target: {
android: {
cflags: [
"-DBORINGSSL_FIPS",
"-DBORINGSSL_FIPS_BREAK_TESTS",
],
sanitize: {
// Disable address sanitizing otherwise libcrypto will not report
// itself as being in FIPS mode, which causes boringssl_self_test
// to fail.
address: false,
},
inject_bssl_hash: true,
static: {
// Disable the static version of libcrypto, as it causes
// problems for FIPS certification. Use libcrypto_static for
// modules that need static libcrypto but do not need FIPS self
// testing, or use dynamic libcrypto.
enabled: false,
},
},
},
min_sdk_version: "29",
}
// Static library
// This version of libcrypto will not have FIPS self tests enabled, so its
// usage is protected through visibility to ensure it doesn't end up used
// somewhere that needs the FIPS version.
cc_library_static {
name: "libcrypto_static",
visibility: [
"//art/build/sdk",
"//bootable/recovery/updater",
"//external/conscrypt",
"//external/python/cpython2",
"//external/rust/crates/quiche",
// Strictly, only the *static* toybox for legacy devices should have
// access to libcrypto_static, but we can't express that.
"//external/toybox",
"//hardware/interfaces/confirmationui/1.0/vts/functional",
"//hardware/interfaces/drm/1.0/vts/functional",
"//hardware/interfaces/drm/1.2/vts/functional",
"//hardware/interfaces/drm/1.3/vts/functional",
"//hardware/interfaces/keymaster/3.0/vts/functional",
"//hardware/interfaces/keymaster/4.0/vts/functional",
"//hardware/interfaces/keymaster/4.1/vts/functional",
"//packages/modules/adb",
"//packages/modules/Bluetooth:__subpackages__",
"//packages/modules/DnsResolver/tests:__subpackages__",
"//packages/modules/NeuralNetworks:__subpackages__",
"//system/core/init",
"//system/core/fs_mgr/liblp",
"//system/core/fs_mgr/liblp/vts_core",
"//system/core/fs_mgr/libsnapshot",
"//system/libvintf/test",
"//system/security/keystore/tests",
"//test/vts-testcase/security/avb",
],
min_sdk_version: "29",
apex_available: [
"//apex_available:platform",
"com.android.neuralnetworks",
],
defaults: [
"libcrypto_bcm_sources",
"libcrypto_sources",
"libcrypto_defaults",
"boringssl_defaults",
"boringssl_flags",
],
}
// Static library for use in bare-metal environments
cc_library_static {
name: "libcrypto_baremetal",
defaults: [
"libcrypto_bcm_sources",
"libcrypto_sources",
"libcrypto_defaults",
"boringssl_defaults",
"boringssl_flags",
],
cflags: [
"-DBORINGSSL_NO_STATIC_INITIALIZER",
"-DOPENSSL_SMALL",
"-DOPENSSL_STATIC_ARMCAP",
"-D__TRUSTY__",
],
visibility: [
"//external/avb",
"//external/open-dice",
"//packages/modules/Virtualization:__subpackages__",
"//system/security/diced/open_dice",
],
apex_available: ["com.android.virt"],
}
// Common defaults for lib*_fuzz_unsafe. These are unsafe and deterministic
// libraries for testing and fuzzing only. See src/FUZZING.md.
cc_defaults {
name: "boringssl_fuzz_unsafe_defaults",
host_supported: true,
cflags: [
"-DBORINGSSL_UNSAFE_DETERMINISTIC_MODE",
"-DBORINGSSL_UNSAFE_FUZZER_MODE",
],
visibility: [
"//frameworks/native/libs/binder/tests:__subpackages__",
],
}
// Unsafe and deterministic version of libcrypto. For testing and fuzzing only.
// See src/FUZZING.md.
cc_test_library {
name: "libcrypto_fuzz_unsafe",
ramdisk_available: false,
vendor_ramdisk_available: false,
defaults: [
"libcrypto_bcm_sources",
"libcrypto_sources",
"libcrypto_defaults",
"boringssl_defaults",
"boringssl_flags",
"boringssl_fuzz_unsafe_defaults",
],
}
//// libssl
// Target static library
// Static and Shared library
cc_library {
name: "libssl",
visibility: ["//visibility:public"],
recovery_available: true,
vendor_available: true,
product_available: true,
native_bridge_supported: true,
vndk: {
enabled: true,
},
host_supported: true,
defaults: [
"libssl_sources",
"boringssl_defaults",
"boringssl_flags",
],
target: {
windows: {
enabled: true,
},
},
unique_host_soname: true,
shared_libs: ["libcrypto"],
apex_available: [
"//apex_available:platform",
"com.android.btservices",
"com.android.adbd",
"com.android.conscrypt",
"com.android.resolv",
"com.android.virt",
],
min_sdk_version: "29",
}
cc_library_static {
name: "libssl_baremetal",
defaults: [
"libssl_sources",
"boringssl_defaults",
"boringssl_flags",
],
static_libs: ["libcrypto_baremetal"],
}
// Unsafe and deterministic version of libssl. For testing and fuzzing only.
// See src/FUZZING.md.
cc_test_library {
name: "libssl_fuzz_unsafe",
host_supported: true,
defaults: [
"libssl_sources",
"boringssl_defaults",
"boringssl_flags",
"boringssl_fuzz_unsafe_defaults",
],
static_libs: [
"libcrypto_fuzz_unsafe",
],
}
// Tool
cc_binary {
name: "bssl",
host_supported: true,
defaults: [
"bssl_sources",
"boringssl_flags",
],
shared_libs: [
"libcrypto",
"libssl",
],
target: {
darwin: {
enabled: false,
},
android: {
compile_multilib: "both",
},
},
multilib: {
lib32: {
suffix: "32",
},
},
}
// Used for ACVP testing for FIPS certification.
// Not installed on devices by default.
cc_binary {
name: "acvp_modulewrapper",
srcs: [
"src/util/fipstools/acvp/modulewrapper/main.cc",
],
target: {
android_x86: {
enabled: false,
},
android_x86_64: {
enabled: false,
},
},
stem: "modulewrapper",
compile_multilib: "both",
multilib: {
lib32: {
suffix: "32",
},
},
static_libs: [
"libacvp_modulewrapper",
],
shared_libs: [
"libcrypto",
],
defaults: [
"boringssl_flags",
],
}
// ACVP wrapper implementation shared between Android and Trusty
cc_library_static {
name: "libacvp_modulewrapper",
host_supported: true,
vendor_available: true,
srcs: [
"src/util/fipstools/acvp/modulewrapper/modulewrapper.cc",
],
target: {
android: {
compile_multilib: "both",
},
},
export_include_dirs: ["src/util/fipstools/acvp/modulewrapper/"],
shared_libs: [
"libcrypto",
],
defaults: [
"boringssl_flags",
],
visibility: ["//system/core/trusty/utils/acvp"],
}
// Test support library
cc_library_static {
name: "boringssl_test_support",
host_supported: true,
defaults: [
"boringssl_test_support_sources",
"boringssl_flags",
],
shared_libs: [
"libcrypto",
],
}
// Tests
cc_test {
name: "boringssl_crypto_test",
test_config: "CryptoNativeTests.xml",
host_supported: false,
per_testcase_directory: true,
compile_multilib: "both",
multilib: {
lib32: {
suffix: "32",
},
lib64: {
suffix: "64",
},
},
defaults: [
"boringssl_crypto_test_sources",
"boringssl_flags",
],
whole_static_libs: ["boringssl_test_support"],
// Statically link the library to test to ensure we always pick up the
// correct version regardless of device linker configuration.
static_libs: ["libcrypto_static"],
target: {
android: {
test_suites: ["mts-conscrypt"],
},
},
}
cc_test {
name: "boringssl_ssl_test",
test_config: "SslNativeTests.xml",
host_supported: false,
per_testcase_directory: true,
compile_multilib: "both",
multilib: {
lib32: {
suffix: "32",
},
lib64: {
suffix: "64",
},
},
defaults: [
"boringssl_ssl_test_sources",
"boringssl_flags",
],
whole_static_libs: ["boringssl_test_support"],
// Statically link the libraries to test to ensure we always pick up the
// correct version regardless of device linker configuration.
static_libs: [
"libcrypto_static",
"libssl",
],
target: {
android: {
test_suites: ["mts-conscrypt"],
},
},
}
// Utility binary for CMVP on-site testing.
cc_binary {
name: "test_fips",
host_supported: false,
defaults: [
"boringssl_flags",
],
shared_libs: [
"libcrypto",
],
srcs: [
"src/util/fipstools/test_fips.c",
],
required: [
"adb",
"libcrypto_for_testing",
],
}
libbssl_sys_raw_flags = [
// Adapted from upstream the src/rust/CMakeLists.txt file at:
// https://boringssl.googlesource.com/boringssl/+/refs/heads/master/rust/CMakeLists.txt
"--no-derive-default",
"--enable-function-attribute-detection",
"--use-core",
"--size_t-is-usize",
"--default-macro-constant-type=signed",
"--rustified-enum=point_conversion_form_t",
"--allowlist-file=.*/include/openssl/.*\\.h",
"--allowlist-file=.*/rust_wrapper\\.h",
// These are not BoringSSL symbols, they are from glibc
// and are not relevant to the build besides throwing warnings
// about their 'long double' (aka u128) not being FFI safe.
// We block those functions so that the build doesn't
// spam warnings.
//
// https://github.com/rust-lang/rust-bindgen/issues/1549 describes the current problem
// and other folks' solutions.
"--blocklist-function=strtold",
"--blocklist-function=qecvt",
"--blocklist-function=qecvt_r",
"--blocklist-function=qgcvt",
"--blocklist-function=qfcvt",
"--blocklist-function=qfcvt_r",
]
// Rust bindings
rust_bindgen {
name: "libbssl_sys_raw",
source_stem: "bindings",
crate_name: "bssl_sys_raw",
host_supported: true,
wrapper_src: "src/rust/bssl-sys/wrapper.h",
vendor_available: true,
product_available: true,
bindgen_flags: libbssl_sys_raw_flags,
shared_libs: [
"libcrypto",
"libssl",
],
apex_available: [
"//apex_available:platform",
"com.android.virt",
],
}
rust_bindgen {
name: "libbssl_sys_raw_nostd",
source_stem: "bindings",
crate_name: "bssl_sys_raw",
wrapper_src: "src/rust/bssl-sys/wrapper.h",
bindgen_flags: [
"--raw-line=#![no_std]",
"--ctypes-prefix=core::ffi",
] + libbssl_sys_raw_flags,
header_libs: [
"libcrypto_baremetal",
"libssl_baremetal",
],
}
// Encapsulate the bindgen-generated layout tests as a test target.
rust_test {
name: "libbssl_sys_raw_test",
srcs: [
":libbssl_sys_raw",
],
crate_name: "bssl_sys_raw_test",
test_suites: ["general-tests"],
auto_gen_config: true,
clippy_lints: "none",
lints: "none",
}
// Rust's bindgen doesn't cope with macros, so this target includes C functions that
// do the same thing as macros defined in BoringSSL header files.
cc_library_static {
name: "libbssl_rust_support",
host_supported: true,
defaults: ["boringssl_flags"],
srcs: ["src/rust/bssl-sys/rust_wrapper.c"],
shared_libs: [
"libcrypto",
"libssl",
],
apex_available: [
"//apex_available:platform",
"com.android.virt",
],
}
cc_library_static {
name: "libbssl_rust_support_baremetal",
defaults: ["boringssl_flags"],
srcs: ["src/rust/bssl-sys/rust_wrapper.c"],
static_libs: [
"libcrypto_baremetal",
"libssl_baremetal",
],
}
// Replace the upstream CMake placeholder with a re-export of all of the local bindgen output.
gensrcs {
name: "libbssl_sys_src",
srcs: ["src/rust/bssl-sys/src/lib.rs"],
cmd: "sed 's@^.{INCLUDES}@pub use bssl_sys_raw::*;@' $(in) > $(out)",
}
rust_library {
name: "libbssl_ffi",
host_supported: true,
crate_name: "bssl_ffi",
visibility: [
"//external/rust/crates/openssl",
"//system/keymint/boringssl",
"//system/security/prng_seeder",
],
// Use the modified source with placeholder replaced.
srcs: [":libbssl_sys_src"],
vendor_available: true,
product_available: true,
// Since libbssl_sys_raw is not publicly visible, we can't accidentally
// force a double-link by linking statically, so do so.
rlibs: ["libbssl_sys_raw"],
whole_static_libs: [
"libbssl_rust_support",
],
apex_available: [
"//apex_available:platform",
"com.android.virt",
],
}
gensrcs {
name: "libbssl_sys_src_nostd",
srcs: [":libbssl_sys_src"],
cmd: "(echo '#![no_std]' && cat $(in)) > $(out)",
}
rust_library_rlib {
name: "libbssl_ffi_nostd",
crate_name: "bssl_ffi",
visibility: [
"//packages/modules/Virtualization/pvmfw",
],
srcs: [":libbssl_sys_src_nostd"],
rlibs: ["libbssl_sys_raw_nostd"],
prefer_rlib: true,
no_stdlibs: true,
stdlibs: [
"libcompiler_builtins.rust_sysroot",
"libcore.rust_sysroot",
],
whole_static_libs: [
"libbssl_rust_support_baremetal",
],
}
|