From afcd339d96a0aabb735fe96678f941c0a78e137d Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Wed, 5 May 2021 13:54:11 -0700 Subject: [PATCH] Remove unused parts of the strip implementation. The --use-gnu-strip option was removed from the shell script already, and it no longer uses the $CROSS_COMPILE environment variable. Bug: http://b/185257607 Bug: http://b/147452927 Test: treehugger Change-Id: If9f7b75d52c1e9cd167d73eeba8f77054ffd63a7 --- cc/builder.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/cc/builder.go b/cc/builder.go index 054201567..29cde9d2c 100644 --- a/cc/builder.go +++ b/cc/builder.go @@ -143,7 +143,7 @@ var ( }(), Pool: darwinStripPool, }, - "args", "crossCompile") + "args") // Rule to invoke `strip` (to discard symbols and data from object files) on darwin architecture. darwinStrip = pctx.AndroidStaticRule("darwinStrip", @@ -993,7 +993,6 @@ func transformBinaryPrefixSymbols(ctx android.ModuleContext, prefix string, inpu func transformStrip(ctx android.ModuleContext, inputFile android.Path, outputFile android.WritablePath, flags StripFlags) { - crossCompile := gccCmd(flags.Toolchain, "") args := "" if flags.StripAddGnuDebuglink { args += " --add-gnu-debuglink" @@ -1010,9 +1009,6 @@ func transformStrip(ctx android.ModuleContext, inputFile android.Path, if flags.StripKeepSymbolsAndDebugFrame { args += " --keep-symbols-and-debug-frame" } - if flags.StripUseGnuStrip { - args += " --use-gnu-strip" - } ctx.Build(pctx, android.BuildParams{ Rule: strip, @@ -1020,8 +1016,7 @@ func transformStrip(ctx android.ModuleContext, inputFile android.Path, Output: outputFile, Input: inputFile, Args: map[string]string{ - "crossCompile": crossCompile, - "args": args, + "args": args, }, }) }