Add $ORIGIN to rpath for host tests am: bd75e1d0bd am: 24d1ed50ac

am: 0c10682d7e

Change-Id: I46ca038e38714057e01624548ede673db3d9cabf
This commit is contained in:
Colin Cross 2017-10-21 17:56:12 +00:00 committed by android-build-merger
commit 9dd0f4dc0b

View file

@ -175,11 +175,16 @@ func (test *testDecorator) linkerDeps(ctx BaseModuleContext, deps Deps) Deps {
}
func (test *testDecorator) linkerInit(ctx BaseModuleContext, linker *baseLinker) {
// add ../../lib[64] to rpath so that out/host/linux-x86/nativetest/<test dir>/<test> can
// find out/host/linux-x86/lib[64]/library.so
runpath := "../../lib"
if ctx.toolchain().Is64Bit() {
runpath += "64"
}
linker.dynamicProperties.RunPaths = append(linker.dynamicProperties.RunPaths, runpath)
// add "" to rpath so that test binaries can find libraries in their own test directory
linker.dynamicProperties.RunPaths = append(linker.dynamicProperties.RunPaths, "")
}
func (test *testDecorator) linkerProps() []interface{} {