Merge "Disable mixed builds for unsupported variants"
This commit is contained in:
29
cc/cc.go
29
cc/cc.go
@@ -25,6 +25,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"android/soong/ui/metrics/bp2build_metrics_proto"
|
"android/soong/ui/metrics/bp2build_metrics_proto"
|
||||||
|
|
||||||
"github.com/google/blueprint"
|
"github.com/google/blueprint"
|
||||||
"github.com/google/blueprint/proptools"
|
"github.com/google/blueprint/proptools"
|
||||||
|
|
||||||
@@ -1922,9 +1923,37 @@ func (c *Module) IsMixedBuildSupported(ctx android.BaseModuleContext) bool {
|
|||||||
//TODO(b/278772861) support sanitizers in Bazel rules
|
//TODO(b/278772861) support sanitizers in Bazel rules
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
if !imageVariantSupportedByBazel(c) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if c.IsSdkVariant() {
|
||||||
|
return false
|
||||||
|
}
|
||||||
return c.bazelHandler != nil
|
return c.bazelHandler != nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func imageVariantSupportedByBazel(c *Module) bool {
|
||||||
|
if c.IsLlndk() {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if c.InVendor() {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if c.InProduct() {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if c.InRamdisk() {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if c.InVendorRamdisk() {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
if c.InRecovery() {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
func allEnabledSanitizersSupportedByBazel(ctx android.BaseModuleContext, c *Module) bool {
|
func allEnabledSanitizersSupportedByBazel(ctx android.BaseModuleContext, c *Module) bool {
|
||||||
if c.sanitize == nil {
|
if c.sanitize == nil {
|
||||||
return true
|
return true
|
||||||
|
Reference in New Issue
Block a user