Paul Crowley | 9da969e | 2022-09-16 23:42:24 +0000 | [diff] [blame] | 1 | // Copyright (C) 2022 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | package { |
| 16 | // See: http://go/android-license-faq |
Paul Crowley | 9da969e | 2022-09-16 23:42:24 +0000 | [diff] [blame] | 17 | // SPDX-license-identifier-Apache-2.0 |
| 18 | default_applicable_licenses: ["system_security_license"], |
| 19 | } |
| 20 | |
| 21 | rust_bindgen { |
| 22 | name: "libcutils_socket_bindgen", |
| 23 | crate_name: "cutils_socket_bindgen", |
| 24 | wrapper_src: "cutils_wrapper.h", |
| 25 | source_stem: "bindings", |
| 26 | bindgen_flags: [ |
| 27 | "--allowlist-function=android_get_control_socket", |
| 28 | ], |
| 29 | shared_libs: [ |
| 30 | "libcutils", |
| 31 | ], |
| 32 | } |
| 33 | |
Jiyong Park | eefd351 | 2022-12-22 10:22:57 +0900 | [diff] [blame^] | 34 | rust_defaults { |
| 35 | name: "prng_seeder_defaults", |
Paul Crowley | 9da969e | 2022-09-16 23:42:24 +0000 | [diff] [blame] | 36 | edition: "2021", |
Paul Crowley | 9da969e | 2022-09-16 23:42:24 +0000 | [diff] [blame] | 37 | rustlibs: [ |
| 38 | "libanyhow", |
| 39 | "libbssl_ffi", |
| 40 | "libclap", |
| 41 | "libcutils_socket_bindgen", |
| 42 | "liblogger", |
| 43 | "liblog_rust", |
| 44 | "libnix", |
| 45 | "libtokio", |
| 46 | ], |
Pete Bentley | 812307d | 2022-09-22 15:29:13 +0100 | [diff] [blame] | 47 | |
| 48 | init_rc: ["prng_seeder.rc"], |
Paul Crowley | 9da969e | 2022-09-16 23:42:24 +0000 | [diff] [blame] | 49 | } |
Jiyong Park | eefd351 | 2022-12-22 10:22:57 +0900 | [diff] [blame^] | 50 | |
| 51 | rust_binary { |
| 52 | name: "prng_seeder", |
| 53 | defaults: ["prng_seeder_defaults"], |
| 54 | srcs: ["src/main.rs"], |
| 55 | } |
| 56 | |
| 57 | rust_binary { |
| 58 | name: "prng_seeder_microdroid", |
| 59 | defaults: ["prng_seeder_defaults"], |
| 60 | srcs: ["src/main.rs"], |
| 61 | stem: "prng_seeder", |
| 62 | bootstrap: true, |
| 63 | installable: false, |
| 64 | prefer_rlib: true, |
| 65 | } |