diff options
Diffstat (limited to 'android/config.go')
-rw-r--r-- | android/config.go | 45 |
1 files changed, 35 insertions, 10 deletions
diff --git a/android/config.go b/android/config.go index 696e7727f..2a4b9272b 100644 --- a/android/config.go +++ b/android/config.go @@ -200,6 +200,11 @@ func (c Config) ReleaseAconfigValueSets() []string { return c.config.productVariables.ReleaseAconfigValueSets } +// If native modules should have symbols stripped by default. Default false, enabled for build tools +func (c Config) StripByDefault() bool { + return proptools.Bool(c.config.productVariables.StripByDefault) +} + func (c Config) ReleaseAconfigExtraReleaseConfigs() []string { result := []string{} if val, ok := c.config.productVariables.BuildFlags["RELEASE_ACONFIG_EXTRA_RELEASE_CONFIGS"]; ok { @@ -385,24 +390,28 @@ type config struct { } type partialCompileFlags struct { - // Is partial compilation enabled at all? - Enabled bool - // Whether to use d8 instead of r8 Use_d8 bool + // Whether to disable stub validation. This is slightly more surgical + // than DISABLE_STUB_VALIDATION, in that it only applies to partial + // compile builds. + Disable_stub_validation bool + + // Whether to disable api lint. + Disable_api_lint bool + // Add others as needed. } // These are the flags when `SOONG_PARTIAL_COMPILE` is empty or not set. -var defaultPartialCompileFlags = partialCompileFlags{ - Enabled: false, -} +var defaultPartialCompileFlags = partialCompileFlags{} // These are the flags when `SOONG_PARTIAL_COMPILE=true`. var enabledPartialCompileFlags = partialCompileFlags{ - Enabled: true, - Use_d8: true, + Use_d8: true, + Disable_stub_validation: false, + Disable_api_lint: false, } type deviceConfig struct { @@ -477,13 +486,29 @@ func (c *config) parsePartialCompileFlags(isEngBuild bool) (partialCompileFlags, state = "+" } switch tok { + case "all": + // Turn on **all** of the flags. + ret = partialCompileFlags{ + Use_d8: true, + Disable_stub_validation: true, + Disable_api_lint: true, + } case "true": ret = enabledPartialCompileFlags case "false": // Set everything to false. ret = partialCompileFlags{} - case "enabled": - ret.Enabled = makeVal(state, defaultPartialCompileFlags.Enabled) + + case "api_lint", "enable_api_lint": + ret.Disable_api_lint = !makeVal(state, !defaultPartialCompileFlags.Disable_api_lint) + case "disable_api_lint": + ret.Disable_api_lint = makeVal(state, defaultPartialCompileFlags.Disable_api_lint) + + case "stub_validation", "enable_stub_validation": + ret.Disable_stub_validation = !makeVal(state, !defaultPartialCompileFlags.Disable_stub_validation) + case "disable_stub_validation": + ret.Disable_stub_validation = makeVal(state, defaultPartialCompileFlags.Disable_stub_validation) + case "use_d8": ret.Use_d8 = makeVal(state, defaultPartialCompileFlags.Use_d8) default: |