vendor: add TARGET_NEEDS_HWC_ONFIRSTREF option
Change-Id: I1cb20129af69f641107c2b552cfd69eecfe65d64
diff --git a/build/soong/android/variable.go b/build/soong/android/variable.go
index 11569a3..75da6a4 100644
--- a/build/soong/android/variable.go
+++ b/build/soong/android/variable.go
@@ -1,6 +1,10 @@
package android
type Product_variables struct {
+ TargetNeedsHWCOnFirstRef struct {
+ Cflags []string
+ }
}
type ProductVariables struct {
+ TargetNeedsHWCOnFirstRef *bool `json:",omitempty"`
}
diff --git a/build/soong/soong_config.mk b/build/soong/soong_config.mk
index 46d8c29..97bceb9 100644
--- a/build/soong/soong_config.mk
+++ b/build/soong/soong_config.mk
@@ -1,6 +1,7 @@
-_contents := $(_contents) "Omnirom":{$(newline)
+_contents := $(_contents) "Omnirom": {$(newline)
# See build/core/soong_config.mk for the add_json_* functions you can use here.
+$(call add_json_bool, TargetNeedsHWCOnFirstRef, $(filter true,$(TARGET_NEEDS_HWC_ONFIRSTREF)))
# This causes the build system to strip out the last comma in our nested struct, to keep the JSON valid.
_contents := $(_contents)__SV_END