Enable stripping by default
Stripping is currently enabled by default for
1. Device modules
2. Host modules, but only in `--soong-only` mode
The special case in (2) causes non-null builds when switching between
`m` and `m --soong-only`. For build consistency and for good UX when
switching `m` and `m --soong-only`, drop this special case.
Soong modules can opt out of stripping by adding `strip.none` explicitly
in the Android.bp files
Test: go test ./cc
Test: presubmits
Bug: 390471378
Change-Id: Ib219114c7c99b6b0d46b7a2af4635fed8cb2d87c
diff --git a/cc/strip.go b/cc/strip.go
index b1f34bb..36c0c48 100644
--- a/cc/strip.go
+++ b/cc/strip.go
@@ -52,11 +52,7 @@
// NeedsStrip determines if stripping is required for a module.
func (stripper *Stripper) NeedsStrip(actx android.ModuleContext) bool {
forceDisable := Bool(stripper.StripProperties.Strip.None)
- defaultEnable := (!actx.Config().KatiEnabled() || 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)
+ return !forceDisable
}
func (stripper *Stripper) strip(actx android.ModuleContext, in android.Path, out android.ModuleOutPath,