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
This commit is contained in:
4
cc/cc.go
4
cc/cc.go
@@ -1355,14 +1355,14 @@ func (c *CCTest) flags(ctx common.AndroidModuleContext, flags CCFlags) CCFlags {
|
||||
}
|
||||
|
||||
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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user