blob: dcf67ddba5087fd847e088a6fd1dbe6f8a38c485 [file] [log] [blame]
//
// Copyright (C) 2021 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_team: "trendy_team_virtualization",
default_applicable_licenses: ["Android-Apache-2.0"],
}
soong_config_module_type {
name: "avf_flag_aware_rust_defaults",
module_type: "rust_defaults",
config_namespace: "ANDROID",
bool_variables: [
"release_avf_enable_device_assignment",
"release_avf_enable_dice_changes",
"release_avf_enable_llpvm_changes",
"release_avf_enable_multi_tenant_microdroid_vm",
"release_avf_enable_remote_attestation",
"release_avf_enable_vendor_modules",
"release_avf_enable_virt_cpufreq",
"release_avf_support_custom_vm_with_paravirtualized_devices",
],
properties: [
"cfgs",
],
}
avf_flag_aware_rust_defaults {
name: "avf_build_flags_rust",
soong_config_variables: {
release_avf_enable_device_assignment: {
cfgs: ["device_assignment"],
},
release_avf_enable_dice_changes: {
cfgs: ["dice_changes"],
},
release_avf_enable_llpvm_changes: {
cfgs: ["llpvm_changes"],
},
release_avf_enable_multi_tenant_microdroid_vm: {
cfgs: ["multi_tenant"],
},
release_avf_enable_remote_attestation: {
cfgs: ["remote_attestation"],
},
release_avf_enable_vendor_modules: {
cfgs: ["vendor_modules"],
},
release_avf_enable_virt_cpufreq: {
cfgs: ["virt_cpufreq"],
},
release_avf_support_custom_vm_with_paravirtualized_devices: {
cfgs: ["paravirtualized_devices"],
},
},
}
soong_config_module_type {
name: "avf_flag_aware_cc_defaults",
module_type: "cc_defaults",
config_namespace: "ANDROID",
bool_variables: [
"release_avf_enable_dice_changes",
"release_avf_enable_vendor_modules",
"release_avf_enable_virt_cpufreq",
],
properties: [
"cflags",
],
}
avf_flag_aware_cc_defaults {
name: "avf_build_flags_cc",
soong_config_variables: {
release_avf_enable_dice_changes: {
cflags: ["-DAVF_OPEN_DICE_CHANGES=1"],
},
release_avf_enable_vendor_modules: {
cflags: ["-DAVF_ENABLE_VENDOR_MODULES=1"],
},
release_avf_enable_virt_cpufreq: {
cflags: ["-DAVF_ENABLE_VIRT_CPUFREQ=1"],
},
},
}
genrule_defaults {
name: "dts_to_dtb",
tools: ["dtc"],
cmd: "FILES=($(in)) && $(location dtc) -@ -I dts -O dtb $${FILES[-1]} -o $(out)",
}
// This is a temporary workaround until b/309090563 is implemented.
aconfig_declarations {
name: "avf_aconfig_flags",
package: "com.android.system.virtualmachine.flags",
container: "com.android.virt",
srcs: [
"avf_flags.aconfig",
],
}
java_aconfig_library {
name: "avf_aconfig_flags_java",
aconfig_declarations: "avf_aconfig_flags",
sdk_version: "module_current",
apex_available: ["com.android.virt"],
}