Merge "bp2build: do not convert prebuilt cc binaries" am: b29852a3da
am: cf754196a8
am: fe0a45aa7b
am: 59a2ef5a68
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1922861 Change-Id: I8da0d3964cd80e301529fc5e0631b65e9b2e20f0
This commit is contained in:
10
cc/cc.go
10
cc/cc.go
@@ -3453,19 +3453,27 @@ var _ snapshot.RelativeInstallPath = (*Module)(nil)
|
|||||||
|
|
||||||
// ConvertWithBp2build converts Module to Bazel for bp2build.
|
// ConvertWithBp2build converts Module to Bazel for bp2build.
|
||||||
func (c *Module) ConvertWithBp2build(ctx android.TopDownMutatorContext) {
|
func (c *Module) ConvertWithBp2build(ctx android.TopDownMutatorContext) {
|
||||||
|
prebuilt := c.IsPrebuilt()
|
||||||
if c.Binary() {
|
if c.Binary() {
|
||||||
|
if !prebuilt {
|
||||||
binaryBp2build(ctx, c, ctx.ModuleType())
|
binaryBp2build(ctx, c, ctx.ModuleType())
|
||||||
|
}
|
||||||
} else if c.Object() {
|
} else if c.Object() {
|
||||||
|
if !prebuilt {
|
||||||
objectBp2Build(ctx, c)
|
objectBp2Build(ctx, c)
|
||||||
|
}
|
||||||
} else if c.CcLibrary() {
|
} else if c.CcLibrary() {
|
||||||
static := c.BuildStaticVariant()
|
static := c.BuildStaticVariant()
|
||||||
shared := c.BuildSharedVariant()
|
shared := c.BuildSharedVariant()
|
||||||
prebuilt := c.IsPrebuilt()
|
|
||||||
|
|
||||||
if static && shared {
|
if static && shared {
|
||||||
|
if !prebuilt {
|
||||||
libraryBp2Build(ctx, c)
|
libraryBp2Build(ctx, c)
|
||||||
|
}
|
||||||
} else if !static && !shared {
|
} else if !static && !shared {
|
||||||
|
if !prebuilt {
|
||||||
libraryHeadersBp2Build(ctx, c)
|
libraryHeadersBp2Build(ctx, c)
|
||||||
|
}
|
||||||
} else if static {
|
} else if static {
|
||||||
if prebuilt {
|
if prebuilt {
|
||||||
prebuiltLibraryStaticBp2Build(ctx, c)
|
prebuiltLibraryStaticBp2Build(ctx, c)
|
||||||
|
@@ -552,7 +552,7 @@ func prebuiltBinaryFactory() android.Module {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func NewPrebuiltBinary(hod android.HostOrDeviceSupported) (*Module, *binaryDecorator) {
|
func NewPrebuiltBinary(hod android.HostOrDeviceSupported) (*Module, *binaryDecorator) {
|
||||||
module, binary := NewBinary(hod)
|
module, binary := newBinary(hod, false)
|
||||||
module.compiler = nil
|
module.compiler = nil
|
||||||
|
|
||||||
prebuilt := &prebuiltBinaryLinker{
|
prebuilt := &prebuiltBinaryLinker{
|
||||||
|
Reference in New Issue
Block a user