summaryrefslogtreecommitdiff
path: root/android/config.go
diff options
context:
space:
mode:
author LaMont Jones <lamontjones@google.com> 2025-02-10 16:24:40 -0800
committer LaMont Jones <lamontjones@google.com> 2025-02-18 12:51:57 -0800
commited6f2b2921c5b7901f674094a50f18794b9e10c9 (patch)
tree26355259d8fa4a55a073120c6184bcba129e0c34 /android/config.go
parent367dac6d541202f3d090e09cf41e5a3fdba4849e (diff)
Support `use_d8` partial compile flag
Make `use_d8` an opt-out flag (when SOONG_PARTIAL_COMPILE=true). Bug: b/374975543 Test: manual, TH Change-Id: Iaef4bb5243957812783c5dbc79a5bf27e1096166
Diffstat (limited to 'android/config.go')
-rw-r--r--android/config.go19
1 files changed, 12 insertions, 7 deletions
diff --git a/android/config.go b/android/config.go
index acaad60ad..3867c1197 100644
--- a/android/config.go
+++ b/android/config.go
@@ -394,6 +394,17 @@ type partialCompileFlags struct {
// Add others as needed.
}
+// These are the flags when `SOONG_PARTIAL_COMPILE` is empty or not set.
+var defaultPartialCompileFlags = partialCompileFlags{
+ Enabled: false,
+}
+
+// These are the flags when `SOONG_PARTIAL_COMPILE=true`.
+var enabledPartialCompileFlags = partialCompileFlags{
+ Enabled: true,
+ Use_d8: true,
+}
+
type deviceConfig struct {
config *config
OncePer
@@ -427,11 +438,6 @@ type jsonConfigurable interface {
// To add a new feature to the list, add the field in the struct
// `partialCompileFlags` above, and then add the name of the field in the
// switch statement below.
-var defaultPartialCompileFlags = partialCompileFlags{
- // Set any opt-out flags here. Opt-in flags are off by default.
- Enabled: false,
-}
-
func (c *config) parsePartialCompileFlags(isEngBuild bool) (partialCompileFlags, error) {
if !isEngBuild {
return partialCompileFlags{}, nil
@@ -472,8 +478,7 @@ func (c *config) parsePartialCompileFlags(isEngBuild bool) (partialCompileFlags,
}
switch tok {
case "true":
- ret = defaultPartialCompileFlags
- ret.Enabled = true
+ ret = enabledPartialCompileFlags
case "false":
// Set everything to false.
ret = partialCompileFlags{}