Use one mutator for all bp2build conversion.
Each conversion required defining a separate mutator, which will each operate on _all_ modules and requires each to repeat checks whether the mutator should operator. Instead, we introduce a single mutator and modules can define a ConvertWithBp2build to implement bp2build conversion for that module. Test: bp2build.sh Bug: 183079158 Change-Id: I99d4b51f441c2903879092c5b56313d606d4338d
This commit is contained in:
@@ -461,7 +461,7 @@ func (test *testBinary) install(ctx ModuleContext, file android.Path) {
|
||||
}
|
||||
|
||||
func NewTest(hod android.HostOrDeviceSupported) *Module {
|
||||
module, binary := NewBinary(hod)
|
||||
module, binary := newBinary(hod, false)
|
||||
module.multilib = android.MultilibBoth
|
||||
binary.baseInstaller = NewTestInstaller()
|
||||
|
||||
@@ -551,6 +551,10 @@ type benchmarkDecorator struct {
|
||||
testConfig android.Path
|
||||
}
|
||||
|
||||
func (benchmark *benchmarkDecorator) benchmarkBinary() bool {
|
||||
return true
|
||||
}
|
||||
|
||||
func (benchmark *benchmarkDecorator) linkerInit(ctx BaseModuleContext) {
|
||||
runpath := "../../lib"
|
||||
if ctx.toolchain().Is64Bit() {
|
||||
@@ -588,7 +592,7 @@ func (benchmark *benchmarkDecorator) install(ctx ModuleContext, file android.Pat
|
||||
}
|
||||
|
||||
func NewBenchmark(hod android.HostOrDeviceSupported) *Module {
|
||||
module, binary := NewBinary(hod)
|
||||
module, binary := newBinary(hod, false)
|
||||
module.multilib = android.MultilibBoth
|
||||
binary.baseInstaller = NewBaseInstaller("benchmarktest", "benchmarktest64", InstallInData)
|
||||
|
||||
|
Reference in New Issue
Block a user