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
diff --git a/cc/cc.go b/cc/cc.go
index f169a38..8391cb5 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -2311,11 +2311,11 @@
}
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
}