blob: 1ac14db062aa67decb988196b1faae124975db28 [file]
// Copyright 2022, The Android Open Source Project
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package {
default_applicable_licenses: ["system_keymint_license"],
}
rust_defaults {
name: "libkmr_crypto_boring_defaults",
edition: "2021",
lints: "android",
rustlibs: [
"libbssl_sys",
"libforeign_types",
"liblibc",
"liblog_rust",
"libkmr_common",
"libkmr_wire",
"libopenssl",
],
cfgs: [
// cfg(soong) is used to distinguish code that only builds on Android, so
// that (most of) the same code can be built under both Soong and cargo.
"soong",
],
}
rust_library {
name: "libkmr_crypto_boring",
crate_name: "kmr_crypto_boring",
srcs: ["src/lib.rs"],
vendor_available: true,
host_supported: true,
defaults: [
"libkmr_crypto_boring_defaults",
],
}
rust_test_host {
name: "libkmr_crypto_boring_test",
srcs: ["src/lib.rs"],
rustlibs: [
"libkmr_tests",
],
defaults: [
"libkmr_crypto_boring_defaults",
],
test_suites: ["general-tests"],
}