diff options
author | Ivan Lozano <ivanlozano@google.com> | 2020-04-07 12:30:33 -0400 |
---|---|---|
committer | Ivan Lozano <ivanlozano@google.com> | 2020-04-07 12:36:00 -0400 |
commit | d6fdca89132b03a2e78724f92f485c9ef12a4486 (patch) | |
tree | 33ed7f909b7ed75923ae42f2a6cf45a036c8f7e5 /rust/compiler.go | |
parent | 1c5d4fe4f7a00d4604e7db3258048e9b3f5878d1 (diff) |
Fix incorrect Rust installation paths.
Rust binaries were installing to the wrong paths. This fixes
the install path by only including the archtype subdir when there's a
multilib conflict for that archtype.
Bug: 153423714
Test: Example rust module installs to expected path.
Change-Id: I63ea1ce7dae0d97d65522e0917d916b44808f442
Diffstat (limited to 'rust/compiler.go')
-rw-r--r-- | rust/compiler.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/rust/compiler.go b/rust/compiler.go index 4593165f4..81b258c1e 100644 --- a/rust/compiler.go +++ b/rust/compiler.go @@ -222,7 +222,10 @@ func (compiler *baseCompiler) installDir(ctx ModuleContext) android.InstallPath if ctx.toolchain().Is64Bit() && compiler.dir64 != "" { dir = compiler.dir64 } - if !ctx.Host() || ctx.Target().NativeBridge == android.NativeBridgeEnabled { + if ctx.Target().NativeBridge == android.NativeBridgeEnabled { + dir = filepath.Join(dir, ctx.Target().NativeBridgeRelativePath) + } + if !ctx.Host() && ctx.Config().HasMultilibConflict(ctx.Arch().ArchType) { dir = filepath.Join(dir, ctx.Arch().ArchType.String()) } return android.PathForModuleInstall(ctx, dir, compiler.subDir, |