Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6e72ef72 authored by Dan Willemsen's avatar Dan Willemsen
Browse files

Move namespace mutator earlier to support defaults

The prebuilts and defaults mutators start adding some dependencies, so
for them to be able to reference imported modules, we need to
run the namespace mutator earlier.

Test: m nothing
Test: Try to use a global defaults module from a namespace
Change-Id: I6e853d20e32251d0fd33c8b2dcc26c0695b808fd
parent ad4692d5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -76,6 +76,7 @@ var preArch = []RegisterMutatorFunc{
	func(ctx RegisterMutatorsContext) {
		ctx.TopDown("load_hooks", loadHookMutator).Parallel()
	},
	RegisterNamespaceMutator,
	RegisterPrebuiltsPreArchMutators,
	RegisterDefaultsPreArchMutators,
}
@@ -86,7 +87,6 @@ func registerArchMutator(ctx RegisterMutatorsContext) {
}

var preDeps = []RegisterMutatorFunc{
	RegisterNamespaceMutator,
	registerArchMutator,
}

+1 −1
Original line number Diff line number Diff line
@@ -606,7 +606,7 @@ func setupTestFromFiles(bps map[string][]byte) (ctx *TestContext, errs []error)
	ctx.MockFileSystem(bps)
	ctx.RegisterModuleType("test_module", ModuleFactoryAdaptor(newTestModule))
	ctx.RegisterModuleType("soong_namespace", ModuleFactoryAdaptor(NamespaceFactory))
	ctx.PreDepsMutators(RegisterNamespaceMutator)
	ctx.PreArchMutators(RegisterNamespaceMutator)
	ctx.Register()

	_, errs = ctx.ParseBlueprintsFiles("Android.bp")