summaryrefslogtreecommitdiff
path: root/cc
diff options
context:
space:
mode:
author Cole Faust <colefaust@google.com> 2025-03-11 16:45:10 -0700
committer Cole Faust <colefaust@google.com> 2025-03-11 16:45:10 -0700
commit77bb6dee6929e915f3abbe7a164e3f50ffbb7e52 (patch)
tree03b95d264c2e99a94a0dc3afa04454ac175829f3 /cc
parent7ed094ef25e59df953b422f011eaac8bb1c1eba1 (diff)
Allow customizing stripping behavior with product variable
aosp/3530072 made the default for host modules be to not strip them, but that increases the size of our build tools prebuilts. Add a flag that can be enabled on the build-tools build. Test: Manually Change-Id: I48173a52fe1a7068731ce0aca2367a0ebee0d068
Diffstat (limited to 'cc')
-rw-r--r--cc/strip.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/cc/strip.go b/cc/strip.go
index 32ea38df1..42c9137b7 100644
--- a/cc/strip.go
+++ b/cc/strip.go
@@ -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)