Merge "Support cc code coverage for mixed build" am: 57c1edc4d9
am: 56868c621b
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2103671 Change-Id: Ibe7fab143ee1ebbdbe4df73c1d173cc9c3c5a315 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -55,6 +55,8 @@ type staticOrSharedAttributes struct {
|
||||
|
||||
Enabled bazel.BoolAttribute
|
||||
|
||||
Native_coverage bazel.BoolAttribute
|
||||
|
||||
sdkAttributes
|
||||
}
|
||||
|
||||
@@ -568,10 +570,15 @@ func bp2BuildParseBaseProps(ctx android.Bp2buildMutatorContext, module *Module)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
compilerAttrs.convertStlProps(ctx, module)
|
||||
(&linkerAttrs).convertStripProps(ctx, module)
|
||||
|
||||
if module.coverage != nil && module.coverage.Properties.Native_coverage != nil &&
|
||||
!Bool(module.coverage.Properties.Native_coverage) {
|
||||
// Native_coverage is arch neutral
|
||||
(&linkerAttrs).features.Append(bazel.MakeStringListAttribute([]string{"-coverage"}))
|
||||
}
|
||||
|
||||
productVariableProps := android.ProductVariableProperties(ctx)
|
||||
|
||||
(&compilerAttrs).convertProductVariables(ctx, productVariableProps)
|
||||
|
Reference in New Issue
Block a user