Add a simple hearder-only library to expose build time flags to C++
This is quite ugly, but will do its job until the build flags are
exposed as aconfig flags. This library will be used by first stage init
to conditionally execute new dice-changes related logic, something along
the lines of:
```
if (IsMicrodroid() && IsAvfOpenDiceChangesEnabled()) {
// run new dice derive binary.
}
```
Bug: 287593065
Test: m
Change-Id: I088e36fed6eb862999f0b0a347a7fc93d69eb9e0
diff --git a/Android.bp b/Android.bp
index f50007f..2091a90 100644
--- a/Android.bp
+++ b/Android.bp
@@ -68,6 +68,7 @@
module_type: "cc_defaults",
config_namespace: "ANDROID",
bool_variables: [
+ "release_avf_enable_dice_changes",
"release_avf_enable_virt_cpufreq",
],
properties: [
@@ -78,6 +79,9 @@
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_virt_cpufreq: {
cflags: ["-DAVF_ENABLE_VIRT_CPUFREQ=1"],
},