Fix logic for adding gnu debuglink to match Make
Only add gnu debuglink on userdebug builds to match Make, and don't add it when using minidebuginfo, which doesn't support it. Bug: 113936524 Test: m checkbuild Change-Id: Ifd529f88d63afa5627172fb6ea612aea77159f40
This commit is contained in:
@@ -572,6 +572,10 @@ func (c *config) MinimizeJavaDebugInfo() bool {
|
||||
return Bool(c.productVariables.MinimizeJavaDebugInfo) && !Bool(c.productVariables.Eng)
|
||||
}
|
||||
|
||||
func (c *config) Debuggable() bool {
|
||||
return Bool(c.productVariables.Debuggable)
|
||||
}
|
||||
|
||||
func (c *config) DevicePrefer32BitExecutables() bool {
|
||||
return Bool(c.productVariables.DevicePrefer32BitExecutables)
|
||||
}
|
||||
|
@@ -39,13 +39,14 @@ func (stripper *stripper) strip(ctx ModuleContext, in android.Path, out android.
|
||||
if ctx.Darwin() {
|
||||
TransformDarwinStrip(ctx, in, out)
|
||||
} else {
|
||||
// TODO(ccross): don't add gnu debuglink for user builds
|
||||
flags.stripAddGnuDebuglink = true
|
||||
if Bool(stripper.StripProperties.Strip.Keep_symbols) {
|
||||
flags.stripKeepSymbols = true
|
||||
} else if !Bool(stripper.StripProperties.Strip.All) {
|
||||
flags.stripKeepMiniDebugInfo = true
|
||||
}
|
||||
if ctx.Config().Debuggable() && !flags.stripKeepMiniDebugInfo {
|
||||
flags.stripAddGnuDebuglink = true
|
||||
}
|
||||
TransformStrip(ctx, in, out, flags)
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user