blob: 2b97927b9f2ca4c552d9e9ca928df5f34f803648 [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: [],
Nikita Ioffe655f5a52024-10-21 15:21:17 +000044 }) + select(release_flag("RELEASE_AVF_ENABLE_VM_TO_TEE_SERVICES_ALLOWLIST"), {
45 true: ["tee_services_allowlist"],
46 default: [],
Inseob Kim812497f2024-07-25 17:08:28 +090047 }) + select(release_flag("RELEASE_AVF_ENABLE_VIRT_CPUFREQ"), {
48 true: ["virt_cpufreq"],
49 default: [],
Nikita Ioffeb4268b32024-09-03 10:23:14 +000050 }) + select(release_flag("RELEASE_AVF_IMPROVE_DEBUGGABLE_VMS"), {
51 true: ["debuggable_vms_improvements"],
52 default: [],
Inseob Kim812497f2024-07-25 17:08:28 +090053 }) + select(release_flag("RELEASE_AVF_SUPPORT_CUSTOM_VM_WITH_PARAVIRTUALIZED_DEVICES"), {
54 true: ["paravirtualized_devices"],
55 default: [],
56 }),
Nikita Ioffe3973d382023-08-31 17:53:25 +010057}
Jaewan Kim0df5fb12023-09-24 23:33:54 +090058
Inseob Kim812497f2024-07-25 17:08:28 +090059cc_defaults {
Nikita Ioffe38b9e712024-02-08 15:55:07 +000060 name: "avf_build_flags_cc",
Inseob Kim812497f2024-07-25 17:08:28 +090061 cflags: select(release_flag("RELEASE_AVF_ENABLE_DICE_CHANGES"), {
62 true: ["-DAVF_OPEN_DICE_CHANGES=1"],
63 default: [],
64 }) + select(release_flag("RELEASE_AVF_ENABLE_VENDOR_MODULES"), {
65 true: ["-DAVF_ENABLE_VENDOR_MODULES=1"],
66 default: [],
67 }) + select(release_flag("RELEASE_AVF_ENABLE_VIRT_CPUFREQ"), {
68 true: ["-DAVF_ENABLE_VIRT_CPUFREQ=1"],
69 default: [],
70 }),
Nikita Ioffe38b9e712024-02-08 15:55:07 +000071}
72
Jaewan Kim0df5fb12023-09-24 23:33:54 +090073genrule_defaults {
74 name: "dts_to_dtb",
75 tools: ["dtc"],
Jaewan Kima232ed02024-02-25 16:08:14 +000076 cmd: "FILES=($(in)) && $(location dtc) -@ -I dts -O dtb $${FILES[-1]} -o $(out)",
Jaewan Kim0df5fb12023-09-24 23:33:54 +090077}