blob: 34719aaadbfb7aec557658eafedf91df55416d1a [file] [log] [blame]
Joel Galensonc19f0062021-02-22 09:52:18 -08001// 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 Badour5f8427a2021-02-26 02:58:11 -080015package {
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 Galensonc19f0062021-02-22 09:52:18 -080024rust_library {
25 name: "libkeystore2_vintf_rust",
26 crate_name: "keystore2_vintf",
27 srcs: ["lib.rs"],
28 rustlibs: [
Joel Galensonec7872a2021-07-02 14:37:10 -070029 "libcxx",
Joel Galensonc19f0062021-02-22 09:52:18 -080030 ],
31 shared_libs: [
Joel Galensonec7872a2021-07-02 14:37:10 -070032 "libvintf",
33 ],
34 static_libs: [
Joel Galensonc19f0062021-02-22 09:52:18 -080035 "libkeystore2_vintf_cpp",
Joel Galensonc19f0062021-02-22 09:52:18 -080036 ],
37}
38
Joel Galensonec7872a2021-07-02 14:37:10 -070039cc_library_static {
Joel Galensonc19f0062021-02-22 09:52:18 -080040 name: "libkeystore2_vintf_cpp",
Joel Galensonec7872a2021-07-02 14:37:10 -070041 srcs: ["vintf.cpp"],
42 generated_headers: ["cxx-bridge-header"],
43 generated_sources: ["vintf_bridge_code"],
Joel Galensonc19f0062021-02-22 09:52:18 -080044 shared_libs: [
45 "libvintf",
46 ],
47}
48
Joel Galensonec7872a2021-07-02 14:37:10 -070049genrule {
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 Galensonc19f0062021-02-22 09:52:18 -080055}
56
57rust_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 Galensonec7872a2021-07-02 14:37:10 -070064 "libcxx",
Joel Galensonc19f0062021-02-22 09:52:18 -080065 ],
66 static_libs: [
67 "libkeystore2_vintf_cpp",
68 ],
69 shared_libs: [
70 "libc++",
71 "libvintf",
72 ],
73}