Janis Danisevskis | ce99543 | 2020-07-21 12:22:34 -0700 | [diff] [blame] | 1 | // Copyright 2020, 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 | |
Bob Badour | 4c7858c | 2021-02-12 15:40:29 -0800 | [diff] [blame] | 15 | package { |
| 16 | // See: http://go/android-license-faq |
| 17 | // A large-scale-change added 'default_applicable_licenses' to import |
| 18 | // all of the 'license_kinds' from "system_security_license" |
| 19 | // to get the below license kinds: |
| 20 | // SPDX-license-identifier-Apache-2.0 |
| 21 | default_applicable_licenses: ["system_security_license"], |
| 22 | } |
| 23 | |
Janis Danisevskis | ce99543 | 2020-07-21 12:22:34 -0700 | [diff] [blame] | 24 | rust_library { |
| 25 | name: "libkeystore2_selinux", |
| 26 | crate_name: "keystore2_selinux", |
| 27 | srcs: [ |
| 28 | "src/lib.rs", |
| 29 | ], |
| 30 | |
| 31 | shared_libs: [ |
| 32 | "libselinux", |
| 33 | ], |
| 34 | |
| 35 | rustlibs: [ |
| 36 | "libanyhow", |
Janis Danisevskis | ff188d3 | 2021-05-13 13:27:13 -0700 | [diff] [blame] | 37 | "liblazy_static", |
Janis Danisevskis | ce99543 | 2020-07-21 12:22:34 -0700 | [diff] [blame] | 38 | "liblog_rust", |
| 39 | "libselinux_bindgen", |
| 40 | "libthiserror", |
| 41 | ], |
| 42 | } |
| 43 | |
| 44 | rust_test { |
| 45 | name: "keystore2_selinux_test", |
| 46 | srcs: [ |
| 47 | "src/lib.rs", |
| 48 | ], |
| 49 | crate_name: "keystore2_selinux_test", |
| 50 | test_suites: ["general-tests"], |
| 51 | auto_gen_config: true, |
| 52 | |
| 53 | shared_libs: [ |
| 54 | "libselinux", |
| 55 | ], |
| 56 | |
| 57 | rustlibs: [ |
| 58 | "libandroid_logger", |
| 59 | "libanyhow", |
Janis Danisevskis | ff188d3 | 2021-05-13 13:27:13 -0700 | [diff] [blame] | 60 | "liblazy_static", |
Janis Danisevskis | ce99543 | 2020-07-21 12:22:34 -0700 | [diff] [blame] | 61 | "liblog_rust", |
| 62 | "libselinux_bindgen", |
| 63 | "libthiserror", |
| 64 | ], |
| 65 | } |
Janis Danisevskis | d746a0d | 2021-05-14 10:58:26 -0700 | [diff] [blame] | 66 | |
| 67 | rust_test { |
| 68 | name: "keystore2_selinux_concurrency_test", |
| 69 | srcs: [ |
| 70 | "src/concurrency_test.rs", |
| 71 | ], |
| 72 | crate_name: "keystore2_selinux_concurrency_test", |
Joel Galenson | 97ac914 | 2021-05-25 10:09:36 -0700 | [diff] [blame] | 73 | test_suites: ["general-tests"], |
Janis Danisevskis | d746a0d | 2021-05-14 10:58:26 -0700 | [diff] [blame] | 74 | auto_gen_config: true, |
| 75 | |
| 76 | rustlibs: [ |
| 77 | "libandroid_logger", |
| 78 | "libanyhow", |
| 79 | "libkeystore2_selinux", |
| 80 | "liblazy_static", |
| 81 | "liblog_rust", |
| 82 | "libnix", |
| 83 | "libnum_cpus", |
| 84 | "libthiserror", |
| 85 | ], |
| 86 | } |