Joel Galenson | c19f006 | 2021-02-22 09:52:18 -0800 | [diff] [blame] | 1 | // Copyright 2021, 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 | 5f8427a | 2021-02-26 02:58:11 -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 | |
Joel Galenson | c19f006 | 2021-02-22 09:52:18 -0800 | [diff] [blame] | 24 | rust_library { |
| 25 | name: "libkeystore2_vintf_rust", |
| 26 | crate_name: "keystore2_vintf", |
| 27 | srcs: ["lib.rs"], |
| 28 | rustlibs: [ |
Joel Galenson | ec7872a | 2021-07-02 14:37:10 -0700 | [diff] [blame] | 29 | "libcxx", |
Joel Galenson | c19f006 | 2021-02-22 09:52:18 -0800 | [diff] [blame] | 30 | ], |
| 31 | shared_libs: [ |
Joel Galenson | ec7872a | 2021-07-02 14:37:10 -0700 | [diff] [blame] | 32 | "libvintf", |
| 33 | ], |
| 34 | static_libs: [ |
Joel Galenson | c19f006 | 2021-02-22 09:52:18 -0800 | [diff] [blame] | 35 | "libkeystore2_vintf_cpp", |
Joel Galenson | c19f006 | 2021-02-22 09:52:18 -0800 | [diff] [blame] | 36 | ], |
| 37 | } |
| 38 | |
Joel Galenson | ec7872a | 2021-07-02 14:37:10 -0700 | [diff] [blame] | 39 | cc_library_static { |
Joel Galenson | c19f006 | 2021-02-22 09:52:18 -0800 | [diff] [blame] | 40 | name: "libkeystore2_vintf_cpp", |
Joel Galenson | ec7872a | 2021-07-02 14:37:10 -0700 | [diff] [blame] | 41 | srcs: ["vintf.cpp"], |
| 42 | generated_headers: ["cxx-bridge-header"], |
| 43 | generated_sources: ["vintf_bridge_code"], |
Joel Galenson | c19f006 | 2021-02-22 09:52:18 -0800 | [diff] [blame] | 44 | shared_libs: [ |
| 45 | "libvintf", |
| 46 | ], |
| 47 | } |
| 48 | |
Joel Galenson | ec7872a | 2021-07-02 14:37:10 -0700 | [diff] [blame] | 49 | genrule { |
| 50 | name: "vintf_bridge_code", |
| 51 | tools: ["cxxbridge"], |
| 52 | cmd: "$(location cxxbridge) $(in) >> $(out)", |
| 53 | srcs: ["lib.rs"], |
| 54 | out: ["vintf_cxx_generated.cc"], |
Joel Galenson | c19f006 | 2021-02-22 09:52:18 -0800 | [diff] [blame] | 55 | } |
| 56 | |
| 57 | rust_test { |
| 58 | name: "keystore2_vintf_test", |
| 59 | crate_name: "keystore2_vintf_test", |
| 60 | srcs: ["lib.rs"], |
| 61 | test_suites: ["general-tests"], |
| 62 | auto_gen_config: true, |
| 63 | rustlibs: [ |
Joel Galenson | ec7872a | 2021-07-02 14:37:10 -0700 | [diff] [blame] | 64 | "libcxx", |
Joel Galenson | c19f006 | 2021-02-22 09:52:18 -0800 | [diff] [blame] | 65 | ], |
| 66 | static_libs: [ |
| 67 | "libkeystore2_vintf_cpp", |
| 68 | ], |
| 69 | shared_libs: [ |
| 70 | "libc++", |
| 71 | "libvintf", |
| 72 | ], |
| 73 | } |