From fabaff6bd74cda382dd7d5152df7362bffe233a3 Mon Sep 17 00:00:00 2001 From: ThiƩbaud Weksteen Date: Thu, 27 Aug 2020 13:48:36 +0200 Subject: rust: strip libraries and binaries Reuses the cc.Stripper logic. Abstracts Stripper to avoid the spreading of references to the cc package. rustc requires unstripped libraries (precisely, with the `.rustc` section) when building dependent targets. Contrary to cc, the output of a compiler module will remain unstripped and only an extra build rule will be added. This rule will be referenced at install time (in baseCompiler.install or androidmk). This change drastically reduces the size of the installed libraries: (unstripped, from out/target/product/crosshatch/system) $ find . -name \*.dylib.so -print0 | du -c --files0-from=- 149996 total (stripped, with this change) $ find . -name \*.dylib.so -print0 | du -c --files0-from=- 42380 total Bug: 153430439 Test: cd external/rust; mma Change-Id: I94fd8bbcec97e0610aa325d3db4460be84d01734 --- rust/proc_macro.go | 3 --- 1 file changed, 3 deletions(-) (limited to 'rust/proc_macro.go') diff --git a/rust/proc_macro.go b/rust/proc_macro.go index 748879cc8..0c6ec9953 100644 --- a/rust/proc_macro.go +++ b/rust/proc_macro.go @@ -66,9 +66,6 @@ func (procMacro *procMacroDecorator) compile(ctx ModuleContext, flags Flags, dep outputFile := android.PathForModuleOut(ctx, fileName) srcPath, _ := srcPathFromModuleSrcs(ctx, procMacro.baseCompiler.Properties.Srcs) - - procMacro.unstrippedOutputFile = outputFile - TransformSrctoProcMacro(ctx, srcPath, deps, flags, outputFile, deps.linkDirs) return outputFile } -- cgit v1.2.3-59-g8ed1b