From adc81a07836e0ed16c70a7fe20e5726b60ecb613 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 14 Dec 2020 17:01:55 -0800 Subject: [PATCH] Don't strip stub libraries LLNDK and NDK stubs are already not stripped, don't strip APEX stubs either. Test: m checkbuild Change-Id: I9a50df4b8b73d764ca81634a8a3014726eceda99 --- cc/library.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cc/library.go b/cc/library.go index 11ee7ddc4..d5c913179 100644 --- a/cc/library.go +++ b/cc/library.go @@ -977,7 +977,12 @@ func (library *libraryDecorator) linkShared(ctx ModuleContext, transformSharedObjectToToc(ctx, outputFile, tocFile, builderFlags) stripFlags := flagsToStripFlags(flags) - if library.stripper.NeedsStrip(ctx) { + needsStrip := library.stripper.NeedsStrip(ctx) + if library.buildStubs() { + // No need to strip stubs libraries + needsStrip = false + } + if needsStrip { if ctx.Darwin() { stripFlags.StripUseGnuStrip = true }