blob: 66cc6268a4a62b586c144c2eb79ea53d1638f7fc [file] [log] [blame]
Bob Badour77c910d2021-06-07 22:20:50 -07001//
2// Copyright (C) 2021 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16package {
Alan Stokes87048612024-02-08 17:08:31 +000017 default_team: "trendy_team_virtualization",
Alan Stokes94475b82023-10-25 15:54:21 +010018 default_applicable_licenses: ["Android-Apache-2.0"],
Bob Badour77c910d2021-06-07 22:20:50 -070019}
Nikita Ioffe3973d382023-08-31 17:53:25 +010020
Inseob Kim812497f2024-07-25 17:08:28 +090021rust_defaults {
Nikita Ioffe3973d382023-08-31 17:53:25 +010022 name: "avf_build_flags_rust",
Inseob Kim812497f2024-07-25 17:08:28 +090023 cfgs: select(release_flag("RELEASE_AVF_ENABLE_DEVICE_ASSIGNMENT"), {
24 true: ["device_assignment"],
25 default: [],
26 }) + select(release_flag("RELEASE_AVF_ENABLE_DICE_CHANGES"), {
27 true: ["dice_changes"],
28 default: [],
29 }) + select(release_flag("RELEASE_AVF_ENABLE_LLPVM_CHANGES"), {
30 true: ["llpvm_changes"],
31 default: [],
32 }) + select(release_flag("RELEASE_AVF_ENABLE_MULTI_TENANT_MICRODROID_VM"), {
33 true: ["multi_tenant"],
34 default: [],
35 }) + select(release_flag("RELEASE_AVF_ENABLE_NETWORK"), {
36 true: ["network"],
37 default: [],
38 }) + select(release_flag("RELEASE_AVF_ENABLE_REMOTE_ATTESTATION"), {
39 true: ["remote_attestation"],
40 default: [],
41 }) + select(release_flag("RELEASE_AVF_ENABLE_VENDOR_MODULES"), {
42 true: ["vendor_modules"],
43 default: [],
44 }) + select(release_flag("RELEASE_AVF_ENABLE_VIRT_CPUFREQ"), {
45 true: ["virt_cpufreq"],
46 default: [],
47 }) + select(release_flag("RELEASE_AVF_SUPPORT_CUSTOM_VM_WITH_PARAVIRTUALIZED_DEVICES"), {
48 true: ["paravirtualized_devices"],
49 default: [],
50 }),
Nikita Ioffe3973d382023-08-31 17:53:25 +010051}
Jaewan Kim0df5fb12023-09-24 23:33:54 +090052
Inseob Kim812497f2024-07-25 17:08:28 +090053cc_defaults {
Nikita Ioffe38b9e712024-02-08 15:55:07 +000054 name: "avf_build_flags_cc",
Inseob Kim812497f2024-07-25 17:08:28 +090055 cflags: select(release_flag("RELEASE_AVF_ENABLE_DICE_CHANGES"), {
56 true: ["-DAVF_OPEN_DICE_CHANGES=1"],
57 default: [],
58 }) + select(release_flag("RELEASE_AVF_ENABLE_VENDOR_MODULES"), {
59 true: ["-DAVF_ENABLE_VENDOR_MODULES=1"],
60 default: [],
61 }) + select(release_flag("RELEASE_AVF_ENABLE_VIRT_CPUFREQ"), {
62 true: ["-DAVF_ENABLE_VIRT_CPUFREQ=1"],
63 default: [],
64 }),
Nikita Ioffe38b9e712024-02-08 15:55:07 +000065}
66
Jaewan Kim0df5fb12023-09-24 23:33:54 +090067genrule_defaults {
68 name: "dts_to_dtb",
69 tools: ["dtc"],
Jaewan Kima232ed02024-02-25 16:08:14 +000070 cmd: "FILES=($(in)) && $(location dtc) -@ -I dts -O dtb $${FILES[-1]} -o $(out)",
Jaewan Kim0df5fb12023-09-24 23:33:54 +090071}
Nikita Ioffee3a049f2024-02-15 15:47:23 +000072
73// This is a temporary workaround until b/309090563 is implemented.
74aconfig_declarations {
75 name: "avf_aconfig_flags",
76 package: "com.android.system.virtualmachine.flags",
Yu Liu6c8ce022024-03-28 17:30:05 +000077 container: "com.android.virt",
Nikita Ioffee3a049f2024-02-15 15:47:23 +000078 srcs: [
79 "avf_flags.aconfig",
80 ],
81}
82
83java_aconfig_library {
84 name: "avf_aconfig_flags_java",
85 aconfig_declarations: "avf_aconfig_flags",
86 sdk_version: "module_current",
87 apex_available: ["com.android.virt"],
88}