cc: fix native tests
Add libgtest to native test dependencies before adding stl
dependencies to resolve link errors between libgtest and
libc++_static.
Install device native tests to /dava/nativetest32 and
/data/nativetest64.
Change-Id: I6d9ddba8d5cdbacaa86cae0833fd7e656657e4d9
diff --git a/cc/cc.go b/cc/cc.go
index f057405..941dff3 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -1355,14 +1355,14 @@
}
func (c *CCTest) depNames(ctx common.AndroidBaseContext, depNames CCDeps) CCDeps {
- depNames = c.CCBinary.depNames(ctx, depNames)
depNames.StaticLibs = append(depNames.StaticLibs, "libgtest", "libgtest_main")
+ depNames = c.CCBinary.depNames(ctx, depNames)
return depNames
}
func (c *CCTest) installModule(ctx common.AndroidModuleContext, flags CCFlags) {
if ctx.Device() {
- ctx.InstallFile("../data/nativetest/"+ctx.ModuleName(), c.out)
+ ctx.InstallFile("../data/nativetest"+ctx.Arch().ArchType.Multilib[3:]+"/"+ctx.ModuleName(), c.out)
} else {
c.CCBinary.installModule(ctx, flags)
}