summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Christoffer Adamsen <christofferqa@google.com> 2024-12-17 14:30:47 +0100
committer Christoffer Adamsen <christofferqa@google.com> 2024-12-17 14:30:47 +0100
commitb81fc91a4afbfc5890efa6032c234e9e0e3a7cab (patch)
tree62d796b94741496c8e399bed0de8254916838ac4
parent9e1f9b9d73dae437aadd9b204136b2fcc8fc4a98 (diff)
Configure R8 store-store-fence constructor inlining when enabled
This optimization will be enabled when RELEASE_R8_STORE_STORE_FENCE_CONSTRUCTOR_INLINING is enabled. Bug: Test: Existing Change-Id: Ia1dc0600e51e396da518daa27cf9c73701095766
-rw-r--r--android/config.go4
-rw-r--r--java/dex.go4
2 files changed, 8 insertions, 0 deletions
diff --git a/android/config.go b/android/config.go
index d78bbf774..fbf950487 100644
--- a/android/config.go
+++ b/android/config.go
@@ -2163,6 +2163,10 @@ func (c *config) UseTransitiveJarsInClasspath() bool {
return c.productVariables.GetBuildFlagBool("RELEASE_USE_TRANSITIVE_JARS_IN_CLASSPATH")
}
+func (c *config) UseR8StoreStoreFenceConstructorInlining() bool {
+ return c.productVariables.GetBuildFlagBool("RELEASE_R8_STORE_STORE_FENCE_CONSTRUCTOR_INLINING")
+}
+
func (c *config) UseDexV41() bool {
return c.productVariables.GetBuildFlagBool("RELEASE_USE_DEX_V41")
}
diff --git a/java/dex.go b/java/dex.go
index 2b3c9319a..168a23114 100644
--- a/java/dex.go
+++ b/java/dex.go
@@ -412,6 +412,10 @@ func (d *dexer) r8Flags(ctx android.ModuleContext, dexParams *compileDexParams,
artProfileOutput = profileOutput
}
+ if ctx.Config().UseR8StoreStoreFenceConstructorInlining() {
+ r8Flags = append(r8Flags, "--store-store-fence-constructor-inlining")
+ }
+
return r8Flags, r8Deps, artProfileOutput
}