summaryrefslogtreecommitdiff
path: root/build/art.go
diff options
context:
space:
mode:
author Lokesh Gidra <lokeshgidra@google.com> 2022-11-18 08:48:11 +0000
committer Treehugger Robot <treehugger-gerrit@google.com> 2022-11-23 22:43:24 +0000
commit0ec131e448a446926bd49a80480a357329f2603a (patch)
tree1ed780e484146c1742521608e83fdeb4bfa3164b /build/art.go
parent9dd926fee1dd7d4ba6fc04022d9b4c23ceb92d28 (diff)
Use cmdline gc-type and phenotype to decide which GC to run
Bug: 242553398 Bug: 160737021 Test: manual with android builds and module installations Change-Id: Icfc25058e669406a0c3eb178376db8041e11c27b
Diffstat (limited to 'build/art.go')
-rw-r--r--build/art.go9
1 files changed, 5 insertions, 4 deletions
diff --git a/build/art.go b/build/art.go
index 970af8ab75..cc5371989f 100644
--- a/build/art.go
+++ b/build/art.go
@@ -70,10 +70,11 @@ func globalFlags(ctx android.LoadHookContext) ([]string, []string) {
if !ctx.Config().IsEnvFalse("ART_USE_GENERATIONAL_CC") {
cflags = append(cflags, "-DART_USE_GENERATIONAL_CC=1")
}
- // For now force CC as we don't want to make userfaultfd GC the default.
- // Eventually, make it such that we force CC only if ART_USE_READ_BARRIER
- // was set to true explicitly during build time.
- cflags = append(cflags, "-DART_FORCE_USE_READ_BARRIER=1")
+ // Force CC only if ART_USE_READ_BARRIER was set to true explicitly during
+ // build time.
+ if ctx.Config().IsEnvTrue("ART_USE_READ_BARRIER") {
+ cflags = append(cflags, "-DART_FORCE_USE_READ_BARRIER=1")
+ }
tlab = true
} else if gcType == "CMC" {
tlab = true