Merge "Use llvm-{strip,objcopy} by default"
am: 363cab0bea
Change-Id: I313eb1919e524d31cd470791fee0ef2ea29ad86f
This commit is contained in:
@@ -317,9 +317,9 @@ func (binary *binaryDecorator) link(ctx ModuleContext,
|
||||
builderFlags := flagsToBuilderFlags(flags)
|
||||
|
||||
if binary.stripper.needsStrip(ctx) {
|
||||
// b/80093681, GNU strip/objcopy bug.
|
||||
// Use llvm-{strip,objcopy} when clang lld is used.
|
||||
builderFlags.stripUseLlvmStrip = binary.baseLinker.useClangLld(ctx)
|
||||
if ctx.Darwin() {
|
||||
builderFlags.stripUseGnuStrip = true
|
||||
}
|
||||
strippedOutputFile := outputFile
|
||||
outputFile = android.PathForModuleOut(ctx, "unstripped", fileName)
|
||||
binary.stripper.strip(ctx, outputFile, strippedOutputFile, builderFlags)
|
||||
|
@@ -255,7 +255,7 @@ type builderFlags struct {
|
||||
stripKeepSymbols bool
|
||||
stripKeepMiniDebugInfo bool
|
||||
stripAddGnuDebuglink bool
|
||||
stripUseLlvmStrip bool
|
||||
stripUseGnuStrip bool
|
||||
|
||||
protoDeps android.Paths
|
||||
protoFlags string
|
||||
@@ -821,8 +821,8 @@ func TransformStrip(ctx android.ModuleContext, inputFile android.Path,
|
||||
if flags.stripKeepSymbols {
|
||||
args += " --keep-symbols"
|
||||
}
|
||||
if flags.stripUseLlvmStrip {
|
||||
args += " --use-llvm-strip"
|
||||
if flags.stripUseGnuStrip {
|
||||
args += " --use-gnu-strip"
|
||||
}
|
||||
|
||||
ctx.Build(pctx, android.BuildParams{
|
||||
|
@@ -686,9 +686,9 @@ func (library *libraryDecorator) linkShared(ctx ModuleContext,
|
||||
TransformSharedObjectToToc(ctx, outputFile, tocFile, builderFlags)
|
||||
|
||||
if library.stripper.needsStrip(ctx) {
|
||||
// b/80093681, GNU strip/objcopy bug.
|
||||
// Use llvm-{strip,objcopy} when clang lld is used.
|
||||
builderFlags.stripUseLlvmStrip = library.baseLinker.useClangLld(ctx)
|
||||
if ctx.Darwin() {
|
||||
builderFlags.stripUseGnuStrip = true
|
||||
}
|
||||
strippedOutputFile := outputFile
|
||||
outputFile = android.PathForModuleOut(ctx, "unstripped", fileName)
|
||||
library.stripper.strip(ctx, outputFile, strippedOutputFile, builderFlags)
|
||||
|
Reference in New Issue
Block a user