diff options
author | Seth Moore <sethmo@google.com> | 2023-08-31 19:00:54 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2023-08-31 19:00:54 +0000 |
commit | 5065296f344ac267a150ee04fe1b662fbe50870a (patch) | |
tree | 58479ceb74c8a97fe27e85a0515d8806c5f36944 | |
parent | 2d73e029a590fff902274f0fc1bbc62086b6ce13 (diff) | |
parent | 0db2cc446ea1f44c217c77ae774f3c95f66ba823 (diff) | |
download | boringssl-5065296f344ac267a150ee04fe1b662fbe50870a.tar.gz |
Merge "Create static version of the rust ffi bssl library" into main
-rw-r--r-- | Android.bp | 38 |
1 files changed, 36 insertions, 2 deletions
@@ -365,6 +365,7 @@ cc_library_static { "//system/core/fs_mgr/libsnapshot", "//system/libvintf/test", "//system/security/keystore/tests", + "//system/security/provisioner", "//test/vts-testcase/security/avb", ], min_sdk_version: "29", @@ -478,6 +479,16 @@ cc_library_static { static_libs: ["libcrypto_baremetal"], } +cc_library_host_static { + name: "libssl_static", + defaults: [ + "libssl_sources", + "boringssl_defaults", + "boringssl_flags", + ], + static_libs: ["libcrypto_static"], +} + // Unsafe and deterministic version of libssl. For testing and fuzzing only. // See src/FUZZING.md. cc_test_library { @@ -767,6 +778,16 @@ cc_library_static { ], } +cc_library_host_static { + name: "libbssl_rust_support_static", + defaults: ["boringssl_flags"], + srcs: ["src/rust/bssl-sys/rust_wrapper.c"], + whole_static_libs: [ + "libcrypto_static", + "libssl_static", + ], +} + // Replace the upstream CMake placeholder with a re-export of all of the local bindgen output. gensrcs { name: "libbssl_sys_src", @@ -774,8 +795,8 @@ gensrcs { cmd: "sed 's@^.{INCLUDES}@pub use bssl_sys_raw::*;@' $(in) > $(out)", } -rust_library { - name: "libbssl_ffi", +rust_defaults { + name: "libbssl_ffi_defaults", host_supported: true, crate_name: "bssl_ffi", visibility: [ @@ -790,6 +811,11 @@ rust_library { // 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"], +} + +rust_library { + name: "libbssl_ffi", + defaults: ["libbssl_ffi_defaults"], whole_static_libs: [ "libbssl_rust_support", ], @@ -799,6 +825,14 @@ rust_library { ], } +rust_library_host_rlib { + name: "libbssl_ffi_static", + defaults: ["libbssl_ffi_defaults"], + whole_static_libs: [ + "libbssl_rust_support_static", + ], +} + gensrcs { name: "libbssl_sys_src_nostd", srcs: [":libbssl_sys_src"], |