From 116ec92e0ebc0d5eaa07f4a7681e582a799dbe15 Mon Sep 17 00:00:00 2001 From: Sasha Smundak Date: Tue, 10 Mar 2020 16:10:06 -0700 Subject: [PATCH] Make the names of 'soong_config_module_type_import' modules unique. blueprint.writeAllModuleActions attemts to sort modules by name, and sorting them assumes that each module's name is unique. Although soong_config_module_type_import modules will not generate anything, their names should be unique, too for that reason. Fixes: 150421585 Test: m nothing Change-Id: I6782e42c129dc3b0fc7649ce97d5f94effc63fa7 --- android/soong_config_modules.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/android/soong_config_modules.go b/android/soong_config_modules.go index 198108d65..8fc08ad57 100644 --- a/android/soong_config_modules.go +++ b/android/soong_config_modules.go @@ -125,7 +125,10 @@ func soongConfigModuleTypeImportFactory() Module { } func (m *soongConfigModuleTypeImport) Name() string { - return "soong_config_module_type_import_" + soongconfig.CanonicalizeToProperty(m.properties.From) + // The generated name is non-deterministic, but it does not + // matter because this module does not emit any rules. + return soongconfig.CanonicalizeToProperty(m.properties.From) + + "soong_config_module_type_import_" + fmt.Sprintf("%p", m) } func (*soongConfigModuleTypeImport) Nameless() {}