Add option to disable VTS backend.
In case it blocks development/breaks a downstream interface, we can
disable these targets until a bug in vtsc is fixed.
Bug: 117348839
Test: manual
Change-Id: I226f1429a855794aeeb85c3f0a702970bcc3a2f6
diff --git a/build/hidl_interface.go b/build/hidl_interface.go
index 5b67d9a..0139a99 100644
--- a/build/hidl_interface.go
+++ b/build/hidl_interface.go
@@ -266,6 +266,9 @@
// expressed by @export annotations in the hal files.
Gen_java_constants bool
+ // Whether to generate VTS-related testing libraries.
+ Gen_vts *bool
+
// example: -randroid.hardware:hardware/interfaces
Full_root_option string `blueprint:"mutated"`
}
@@ -408,9 +411,9 @@
shouldGenerateLibrary := !isCorePackage(name.string())
// explicitly true if not specified to give early warning to devs
- shouldGenerateJava := i.properties.Gen_java == nil || *i.properties.Gen_java
+ shouldGenerateJava := proptools.BoolDefault(i.properties.Gen_java, true)
shouldGenerateJavaConstants := i.properties.Gen_java_constants
- shouldGenerateVts := shouldGenerateLibrary
+ shouldGenerateVts := shouldGenerateLibrary && proptools.BoolDefault(i.properties.Gen_vts, true)
var libraryIfExists []string
if shouldGenerateLibrary {