Support cc_test_host
Support cc_test_host for gtest tests compiled for the host. Change-Id: I632d2c211075ba9391d934609f1bf368459397e1
This commit is contained in:
21
cc/cc.go
21
cc/cc.go
@@ -1214,10 +1214,11 @@ func (c *CCBinary) DepNames(ctx common.AndroidBaseContext, depNames CCDeps) CCDe
|
||||
}
|
||||
|
||||
func NewCCBinary(binary *CCBinary, module CCModuleType,
|
||||
hod common.HostOrDeviceSupported) (blueprint.Module, []interface{}) {
|
||||
hod common.HostOrDeviceSupported, props ...interface{}) (blueprint.Module, []interface{}) {
|
||||
|
||||
return newCCDynamic(&binary.ccLinked, module, hod, common.MultilibFirst,
|
||||
&binary.BinaryProperties)
|
||||
props = append(props, &binary.BinaryProperties)
|
||||
|
||||
return newCCDynamic(&binary.ccLinked, module, hod, common.MultilibFirst, props...)
|
||||
}
|
||||
|
||||
func CCBinaryFactory() (blueprint.Module, []interface{}) {
|
||||
@@ -1334,8 +1335,8 @@ func (c *ccTest) installModule(ctx common.AndroidModuleContext, flags CCFlags) {
|
||||
|
||||
func CCTestFactory() (blueprint.Module, []interface{}) {
|
||||
module := &ccTest{}
|
||||
return newCCDynamic(&module.ccLinked, module, common.HostAndDeviceSupported,
|
||||
common.MultilibFirst, &module.BinaryProperties, &module.testProperties)
|
||||
return NewCCBinary(&module.CCBinary, module, common.HostAndDeviceSupported,
|
||||
&module.testProperties)
|
||||
}
|
||||
|
||||
func TestPerSrcMutator(mctx blueprint.EarlyMutatorContext) {
|
||||
@@ -1408,6 +1409,16 @@ func CCBinaryHostFactory() (blueprint.Module, []interface{}) {
|
||||
return NewCCBinary(module, module, common.HostSupported)
|
||||
}
|
||||
|
||||
//
|
||||
// Host Tests
|
||||
//
|
||||
|
||||
func CCTestHostFactory() (blueprint.Module, []interface{}) {
|
||||
module := &ccTest{}
|
||||
return NewCCBinary(&module.CCBinary, module, common.HostSupported,
|
||||
&module.testProperties)
|
||||
}
|
||||
|
||||
//
|
||||
// Device libraries shipped with gcc
|
||||
//
|
||||
|
Reference in New Issue
Block a user