diff options
author | 2025-03-07 15:22:13 -0800 | |
---|---|---|
committer | 2025-03-07 15:22:13 -0800 | |
commit | 4fe1a5bd3337f1deea3f7e7f1d436085326dc695 (patch) | |
tree | f32e3ff402e7c4601ea659cfe7788e353fce4c4b /cc | |
parent | 4a053d74d73a4826530d1b06be8aa5ad55212ff2 (diff) | |
parent | a31dfe682c66aa91f89427770fa53655dff94b60 (diff) |
Merge "Disable default strip for host variants" into main
Diffstat (limited to 'cc')
-rw-r--r-- | cc/strip.go | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/cc/strip.go b/cc/strip.go index a950df898..32ea38df1 100644 --- a/cc/strip.go +++ b/cc/strip.go @@ -23,8 +23,9 @@ import ( // StripProperties defines the type of stripping applied to the module. type StripProperties struct { Strip struct { - // Device and host modules default to stripping enabled leaving mini debuginfo. - // This can be disabled by setting none to true. + // Device modules default to stripping enabled leaving mini debuginfo. + // Host modules default to stripping disabled, but can be enabled by setting any other + // strip boolean property. None *bool `android:"arch_variant"` // all forces stripping everything, including the mini debug info. @@ -50,7 +51,12 @@ type Stripper struct { // NeedsStrip determines if stripping is required for a module. func (stripper *Stripper) NeedsStrip(actx android.ModuleContext) bool { forceDisable := Bool(stripper.StripProperties.Strip.None) - return !forceDisable + // Strip is enabled by default for device variants. + defaultEnable := actx.Device() + forceEnable := Bool(stripper.StripProperties.Strip.All) || + Bool(stripper.StripProperties.Strip.Keep_symbols) || + Bool(stripper.StripProperties.Strip.Keep_symbols_and_debug_frame) + return !forceDisable && (forceEnable || defaultEnable) } func (stripper *Stripper) strip(actx android.ModuleContext, in android.Path, out android.ModuleOutPath, |