diff options
| author | 2020-08-31 07:54:32 +0000 | |
|---|---|---|
| committer | 2020-08-31 07:54:32 +0000 | |
| commit | 416149e09b30e80e0599c1b9b482605704ac29c3 (patch) | |
| tree | 31583bbd2a24da34cd804259afc2190035796ee4 /rust/compiler.go | |
| parent | 9c35c9ae6305a64173da2e29d171748a90ca0048 (diff) | |
| parent | fabaff6bd74cda382dd7d5152df7362bffe233a3 (diff) | |
Merge changes I94fd8bbc,I497dcdff,I1873a180
* changes:
rust: strip libraries and binaries
rust: add ccToolchain to Module
rust: enable use-android-relr-tags
Diffstat (limited to 'rust/compiler.go')
| -rw-r--r-- | rust/compiler.go | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/rust/compiler.go b/rust/compiler.go index 2600f4d0f..ddf1fac3a 100644 --- a/rust/compiler.go +++ b/rust/compiler.go @@ -129,8 +129,9 @@ type baseCompiler struct { location installLocation coverageOutputZipFile android.OptionalPath - unstrippedOutputFile android.Path distFile android.OptionalPath + // Stripped output file. If Valid(), this file will be installed instead of outputFile. + strippedOutputFile android.OptionalPath } func (compiler *baseCompiler) Disabled() bool { @@ -269,8 +270,12 @@ func (compiler *baseCompiler) nativeCoverage() bool { return false } -func (compiler *baseCompiler) install(ctx ModuleContext, file android.Path) { - compiler.path = ctx.InstallFile(compiler.installDir(ctx), file.Base(), file) +func (compiler *baseCompiler) install(ctx ModuleContext) { + path := ctx.RustModule().outputFile + if compiler.strippedOutputFile.Valid() { + path = compiler.strippedOutputFile + } + compiler.path = ctx.InstallFile(compiler.installDir(ctx), path.Path().Base(), path.Path()) } func (compiler *baseCompiler) getStem(ctx ModuleContext) string { |