diff options
Diffstat (limited to 'android/config.go')
-rw-r--r-- | android/config.go | 52 |
1 files changed, 32 insertions, 20 deletions
diff --git a/android/config.go b/android/config.go index 87aacd5cb..f6d08b841 100644 --- a/android/config.go +++ b/android/config.go @@ -294,6 +294,10 @@ func (c Config) ReleaseFingerprintAconfigPackages() bool { return c.config.productVariables.GetBuildFlagBool("RELEASE_FINGERPRINT_ACONFIG_PACKAGES") } +func (c Config) ReleaseAconfigCheckApiLevel() bool { + return c.config.productVariables.GetBuildFlagBool("RELEASE_ACONFIG_CHECK_API_LEVEL") +} + // A DeviceConfig object represents the configuration for a particular device // being built. For now there will only be one of these, but in the future there // may be multiple devices being built. @@ -382,14 +386,25 @@ type config struct { type partialCompileFlags struct { // Is partial compilation enabled at all? - enabled bool + Enabled bool // Whether to use d8 instead of r8 - use_d8 bool + Use_d8 bool // 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 @@ -423,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 @@ -468,15 +478,14 @@ 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{} case "enabled": - ret.enabled = makeVal(state, defaultPartialCompileFlags.enabled) + ret.Enabled = makeVal(state, defaultPartialCompileFlags.Enabled) case "use_d8": - ret.use_d8 = makeVal(state, defaultPartialCompileFlags.use_d8) + ret.Use_d8 = makeVal(state, defaultPartialCompileFlags.Use_d8) default: return partialCompileFlags{}, fmt.Errorf("Unknown SOONG_PARTIAL_COMPILE value: %v", tok) } @@ -2167,18 +2176,22 @@ func (c *config) UseOptimizedResourceShrinkingByDefault() bool { return c.productVariables.GetBuildFlagBool("RELEASE_USE_OPTIMIZED_RESOURCE_SHRINKING_BY_DEFAULT") } -func (c *config) UseResourceProcessorByDefault() bool { - return c.productVariables.GetBuildFlagBool("RELEASE_USE_RESOURCE_PROCESSOR_BY_DEFAULT") +func (c *config) UseR8FullModeByDefault() bool { + return c.productVariables.GetBuildFlagBool("RELEASE_R8_FULL_MODE_BY_DEFAULT") } -func (c *config) UseTransitiveJarsInClasspath() bool { - return c.productVariables.GetBuildFlagBool("RELEASE_USE_TRANSITIVE_JARS_IN_CLASSPATH") +func (c *config) UseR8OnlyRuntimeVisibleAnnotations() bool { + return c.productVariables.GetBuildFlagBool("RELEASE_R8_ONLY_RUNTIME_VISIBLE_ANNOTATIONS") } func (c *config) UseR8StoreStoreFenceConstructorInlining() bool { 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") } @@ -2195,7 +2208,7 @@ var ( "RELEASE_APEX_CONTRIBUTIONS_CONFIGINFRASTRUCTURE": "com.android.configinfrastructure", "RELEASE_APEX_CONTRIBUTIONS_CONNECTIVITY": "com.android.tethering", "RELEASE_APEX_CONTRIBUTIONS_CONSCRYPT": "com.android.conscrypt", - "RELEASE_APEX_CONTRIBUTIONS_CRASHRECOVERY": "", + "RELEASE_APEX_CONTRIBUTIONS_CRASHRECOVERY": "com.android.crashrecovery", "RELEASE_APEX_CONTRIBUTIONS_DEVICELOCK": "com.android.devicelock", "RELEASE_APEX_CONTRIBUTIONS_DOCUMENTSUIGOOGLE": "", "RELEASE_APEX_CONTRIBUTIONS_EXTSERVICES": "com.android.extservices", @@ -2206,9 +2219,11 @@ var ( "RELEASE_APEX_CONTRIBUTIONS_MODULE_METADATA": "", "RELEASE_APEX_CONTRIBUTIONS_NETWORKSTACKGOOGLE": "", "RELEASE_APEX_CONTRIBUTIONS_NEURALNETWORKS": "com.android.neuralnetworks", + "RELEASE_APEX_CONTRIBUTIONS_NFC": "com.android.nfcservices", "RELEASE_APEX_CONTRIBUTIONS_ONDEVICEPERSONALIZATION": "com.android.ondevicepersonalization", "RELEASE_APEX_CONTRIBUTIONS_PERMISSION": "com.android.permission", "RELEASE_APEX_CONTRIBUTIONS_PRIMARY_LIBS": "", + "RELEASE_APEX_CONTRIBUTIONS_PROFILING": "com.android.profiling", "RELEASE_APEX_CONTRIBUTIONS_REMOTEKEYPROVISIONING": "com.android.rkpd", "RELEASE_APEX_CONTRIBUTIONS_RESOLV": "com.android.resolv", "RELEASE_APEX_CONTRIBUTIONS_SCHEDULING": "com.android.scheduling", @@ -2217,6 +2232,7 @@ var ( "RELEASE_APEX_CONTRIBUTIONS_STATSD": "com.android.os.statsd", "RELEASE_APEX_CONTRIBUTIONS_TELEMETRY_TVP": "", "RELEASE_APEX_CONTRIBUTIONS_TZDATA": "com.android.tzdata", + "RELEASE_APEX_CONTRIBUTIONS_UPROBESTATS": "com.android.uprobestats", "RELEASE_APEX_CONTRIBUTIONS_UWB": "com.android.uwb", "RELEASE_APEX_CONTRIBUTIONS_WIFI": "com.android.wifi", } @@ -2286,10 +2302,6 @@ func (c *config) VendorPropFiles(ctx PathContext) Paths { return PathsForSource(ctx, c.productVariables.VendorPropFiles) } -func (c *config) ExtraAllowedDepsTxt() string { - return String(c.productVariables.ExtraAllowedDepsTxt) -} - func (c *config) EnableUffdGc() string { return String(c.productVariables.EnableUffdGc) } |