Merge "Dedup cc binary build components registration" am: e24093a784 am: 87318085ca am: bdcf05af66

Change-Id: Id1ecda6c1f14c714d8aa22b5efddd0ba3c7300fe
This commit is contained in:
Automerger Merge Worker
2020-01-17 11:46:56 +00:00
3 changed files with 7 additions and 5 deletions

View File

@@ -56,8 +56,12 @@ type BinaryLinkerProperties struct {
}
func init() {
android.RegisterModuleType("cc_binary", BinaryFactory)
android.RegisterModuleType("cc_binary_host", binaryHostFactory)
RegisterBinaryBuildComponents(android.InitRegistrationContext)
}
func RegisterBinaryBuildComponents(ctx android.RegistrationContext) {
ctx.RegisterModuleType("cc_binary", BinaryFactory)
ctx.RegisterModuleType("cc_binary_host", binaryHostFactory)
}
// cc_binary produces a binary that is runnable on a device.

View File

@@ -23,6 +23,7 @@ func RegisterRequiredBuildComponentsForTest(ctx android.RegistrationContext) {
android.RegisterPrebuiltMutators(ctx)
RegisterCCBuildComponents(ctx)
RegisterBinaryBuildComponents(ctx)
RegisterLibraryBuildComponents(ctx)
ctx.RegisterModuleType("toolchain_library", ToolchainLibraryFactory)
@@ -305,8 +306,6 @@ func TestConfig(buildDir string, os android.OsType, env map[string]string,
func CreateTestContext() *android.TestContext {
ctx := android.NewTestArchContext()
ctx.RegisterModuleType("cc_binary", BinaryFactory)
ctx.RegisterModuleType("cc_binary_host", binaryHostFactory)
ctx.RegisterModuleType("cc_fuzz", FuzzFactory)
ctx.RegisterModuleType("cc_test", TestFactory)
ctx.RegisterModuleType("llndk_headers", llndkHeadersFactory)