Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8d2c5203 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Allow customizing stripping behavior with product variable" into main...

Merge "Allow customizing stripping behavior with product variable" into main am: 84ec3e01 am: 380aef16

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/3538037



Change-Id: Ic402445814207be7e13d591105217a120f547dac
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents fb8f3247 380aef16
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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 {
+2 −0
Original line number Diff line number Diff line
@@ -554,6 +554,8 @@ type ProductVariables struct {
	OdmManifestFiles       []string `json:",omitempty"`

	UseSoongNoticeXML *bool `json:",omitempty"`

	StripByDefault *bool `json:",omitempty"`
}

type PartitionQualifiedVariablesType struct {
+1 −1
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ type Stripper struct {
func (stripper *Stripper) NeedsStrip(actx android.ModuleContext) bool {
	forceDisable := Bool(stripper.StripProperties.Strip.None)
	// Strip is enabled by default for device variants.
	defaultEnable := actx.Device()
	defaultEnable := actx.Device() || actx.Config().StripByDefault()
	forceEnable := Bool(stripper.StripProperties.Strip.All) ||
		Bool(stripper.StripProperties.Strip.Keep_symbols) ||
		Bool(stripper.StripProperties.Strip.Keep_symbols_and_debug_frame)