Integrate RELEASE_R8_GLOBAL_CHECK_NOT_NULL_FLAGS into soong
Include the new set of `checknotnull.flags` based on the build flag,
allowing `-convertchecknotnull` R8 optimizations for a class of common
null checks.
Bug: 280633711
Test: build-flag set RELEASE_R8_GLOBAL_CHECK_NOT_NULL_FLAGS && m
Flag: RELEASE_R8_GLOBAL_CHECK_NOT_NULL_FLAGS
Change-Id: Idf015a3ea5bd9f6e11213f683da008b5706668e0
diff --git a/android/config.go b/android/config.go
index acaad60..82acfc3 100644
--- a/android/config.go
+++ b/android/config.go
@@ -2191,6 +2191,10 @@
return c.productVariables.GetBuildFlagBool("RELEASE_R8_STORE_STORE_FENCE_CONSTRUCTOR_INLINING")
}
+func (c *config) UseR8GlobalCheckNotNullFlags() bool {
+ return c.productVariables.GetBuildFlagBool("RELEASE_R8_GLOBAL_CHECK_NOT_NULL_FLAGS")
+}
+
func (c *config) UseDexV41() bool {
return c.productVariables.GetBuildFlagBool("RELEASE_USE_DEX_V41")
}