From 9f59e8db270f58a3f2e4fe5bc041f84363a5877e Mon Sep 17 00:00:00 2001 From: Matthew Maurer Date: Thu, 19 Aug 2021 13:10:05 -0700 Subject: rust: Hook up InstallIn functions + Product InstallIn functions must be hooked up not only to install to special images, but also to receive special handling by android/arch.go such that some images are implicitly multilib: first. Also hook up more product details. Bug: 178565008 Bug: 165791368 Test: lunch aosp_arm64; m Change-Id: I1980d5aa9d55f78c222b98d60a404cd6ea5abbfb --- rust/compiler.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'rust/compiler.go') diff --git a/rust/compiler.go b/rust/compiler.go index d9e21ff3a..7bd9af4a8 100644 --- a/rust/compiler.go +++ b/rust/compiler.go @@ -397,8 +397,15 @@ func (compiler *baseCompiler) installDir(ctx ModuleContext) android.InstallPath } if compiler.location == InstallInData && ctx.RustModule().UseVndk() { - dir = filepath.Join(dir, "vendor") + if ctx.RustModule().InProduct() { + dir = filepath.Join(dir, "product") + } else if ctx.RustModule().InVendor() { + dir = filepath.Join(dir, "vendor") + } else { + ctx.ModuleErrorf("Unknown data+VNDK installation kind") + } } + return android.PathForModuleInstall(ctx, dir, compiler.subDir, compiler.relativeInstallPath(), compiler.relative) } -- cgit v1.2.3-59-g8ed1b