Fix rpath for host benchmarks

Host benchmarks are installed in
out/host/*/nativetest/<module>/<benchmark> now, so the rpath needs to
include ../../lib.  Make benchmarkLinker extend testBinaryLinker in
order to pick up the correct rpath.

Change-Id: I3c34aee8d3c21a08b75258c1d5caf6c9fb6feab3
This commit is contained in:
Colin Cross 2016-07-14 10:27:10 -07:00
parent 72ad175126
commit aa3bf3768a
1 changed files with 2 additions and 2 deletions

View File

@ -2311,11 +2311,11 @@ func testLibraryFactory() (blueprint.Module, []interface{}) {
}
type benchmarkLinker struct {
binaryLinker
testBinaryLinker
}
func (benchmark *benchmarkLinker) deps(ctx BaseModuleContext, deps Deps) Deps {
deps = benchmark.binaryLinker.deps(ctx, deps)
deps = benchmark.testBinaryLinker.deps(ctx, deps)
deps.StaticLibs = append(deps.StaticLibs, "libgoogle-benchmark")
return deps
}