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:
4
cc/cc.go
4
cc/cc.go
@@ -2311,11 +2311,11 @@ func testLibraryFactory() (blueprint.Module, []interface{}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type benchmarkLinker struct {
|
type benchmarkLinker struct {
|
||||||
binaryLinker
|
testBinaryLinker
|
||||||
}
|
}
|
||||||
|
|
||||||
func (benchmark *benchmarkLinker) deps(ctx BaseModuleContext, deps Deps) Deps {
|
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")
|
deps.StaticLibs = append(deps.StaticLibs, "libgoogle-benchmark")
|
||||||
return deps
|
return deps
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user