diff options
author | 2022-04-29 02:04:30 +0900 | |
---|---|---|
committer | 2022-04-28 23:55:43 +0000 | |
commit | 10bea7d44a96604b7335161065d6c8debfdc67ab (patch) | |
tree | f72b50a97a143ed19b02478f4fb2617a4a47ee7b /rust/test.go | |
parent | f7fa021b6529cf467cc1bcda60a5a00615f257ca (diff) |
Put rust_test.data_libs under lib[64]
Rust test binary depending on native libraries would require them under
lib[64] directory so that the test binary can open them with default
rpath values.
Bug: 204562227
Test: presubmit
Change-Id: I029bb32c4c98fba21bd28e579a9df9f184a7f045
Diffstat (limited to 'rust/test.go')
-rw-r--r-- | rust/test.go | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/rust/test.go b/rust/test.go index 250b7657e..6e5393595 100644 --- a/rust/test.go +++ b/rust/test.go @@ -15,6 +15,8 @@ package rust import ( + "path/filepath" + "github.com/google/blueprint/proptools" "android/soong/android" @@ -151,9 +153,15 @@ func (test *testDecorator) install(ctx ModuleContext) { ctx.ModuleErrorf("data_lib %q is not a linkable module", depName) } if linkableDep.OutputFile().Valid() { + // Copy the output in "lib[64]" so that it's compatible with + // the default rpath values. + libDir := "lib" + if linkableDep.Target().Arch.ArchType.Multilib == "lib64" { + libDir = "lib64" + } test.data = append(test.data, android.DataPath{SrcPath: linkableDep.OutputFile().Path(), - RelativeInstallPath: linkableDep.RelativeInstallPath()}) + RelativeInstallPath: filepath.Join(libDir, linkableDep.RelativeInstallPath())}) } }) |