Commit graph

10 commits

Author SHA1 Message Date
Treehugger Robot
344eed4eb1 Merge "Add SingletonContext::VisitDirectDepths[If] to Android proxy." 2019-10-17 00:45:25 +00:00
Mitch Phillips
3a7a31b0c1 Add SingletonContext::VisitDirectDepths[If] to Android proxy.
Adds the VisitDirectDepths[If] function from blueprint to the Android
SingletonContext proxy.

Bug: N/A
Test: N/A
Change-Id: I4037364ef11b545abc9a383db7e1e818854db68f
2019-10-16 15:06:32 -07:00
Colin Cross
2e2dbc250a Use localPool consistently for UseGoma() == true
Remove the distinction between pctx.StaticRule and
pctx.AndroidStaticRule so that all of the local rules correctly
get assigned to the localPool.  Also put Module and Singleton
rules into the localPool.

Test: compare out/soong/build.ninja
Change-Id: Id2bb38eff3c7209340fe55bc9006f00bd3661d81
2019-10-01 14:11:20 -07:00
Colin Cross
4c83e5ccd4 Support testing Rules in Modules and Rules and Builds in Singletons
Add support for TestingModule to return RuleParams for rules created
by the module.

Refactor TestingModule to use helpers, and use the helpers to
implement a similar TestingSingleton.

Use the new functionality to test RuleBuilder's module and singleton
rules.

Test: none
Change-Id: I8348c56ff5086d0c49401f5a00faf7c864e6b6f3
2019-03-05 03:17:26 +00:00
Colin Cross
65494b962b Make MakeVarsContext a PathContext
Expose all of SingletonContext to makeVarsContext, and then export
the subset of it that is used through MakeVarsContext.SingletonContext,
plus what is necessary for PathContext, directly through
MakeVarsContext.

Test: m checkbuild
Change-Id: Ie00f36e577fe110b6fa03b901da489d8547773c6
2019-02-07 22:31:04 +00:00
Colin Cross
2465c3d998 Add phony targets for go binary modules
Add custom handling to androidmk.go for the bootstrap.GoBinaryTool
interface in order to create .PHONY targets for each tool written
in go.

Bug: 64539926
Test: m checkbuild
Test: m androidmk
Test: m multiproduct_kati
Change-Id: Ic65faa27a6ee4dfbd54ed6d208091db7c1d657a2
2018-09-28 10:25:45 -07:00
Colin Cross
6b75360cbc Use WalkDeps instead of VisitDepsDepthFirst
VisitDepsDepthFirst is almost never correct, as it can't query
dependency tags of multiple dependencies between the same two modules.
Replace VisitDepsDepthFirst with WalkDeps in sanitize.go and
python.go.  Also verify the dependency tag before continuing to
recurse to ensure that they don't recurse through genrules and into
unrelated modules.

Test: m checkbuild
Change-Id: I2f7560126f56b51a40ec39dfbdcc18b5891489f7
2018-06-22 12:44:35 -07:00
Colin Cross
59014396ba Make SingletonContext.Rule take a blueprint.RuleParams
Make the currently-unused SingletonContext.Rule match
ModuleContext.Rule and take a blueprint.RuleParams instead
of an android.RuleParams, and delete android.RuleParams.

Test: m checkbuild
Change-Id: I018685a3dc13f60825b5ba383ef365df2bc98dfc
2017-12-12 11:12:32 -08:00
Colin Cross
aabf67968c Make *Context.Config return a Config instead of a interface{}
In Soong, a Config() method will always return a Config.  Make
ModuleContext, SingletonContext, TopDownMutatorContext and
BottomUpMutatorContext's Config() methods explictly return
a Config to avoid having to type-assert everywhere.  Overriding
the Config method requires duplicating the list of methods in
blueprint.BaseModuleContext and blueprint.BottomUpMutatorContext,
following the same pattern used by the other *Contexts.

Config() obsoletes the AConfig() method used in some places, which
will be cleaned up in the next patch.

Test: m checkbuild
Change-Id: Ibe21efde933959811d52443496967ab8ce71215e
2017-11-30 00:44:11 +00:00
Colin Cross
0875c52de7 Wrap PackageContext and SingletonContext
Wrap blueprint.PackageContext so that the *Func methods can provide
an android.Config instead of an interface{}.  The modified signatures
means that every method in ModuleContext and SingletonContext
that takes a blueprint.PackageContext now needs to be wrapped to
take an android.PackageContext.

SingletonContext wasn't previously wrapped at all, but as long
as it is, wrap everything like ModuleContext does.  This requires
updating every Singleton to use the android-specific methods.

Test: builds, all Soong tests pass
Change-Id: I4f22085ebca7def6c5cde49e8210b59d994ba625
2017-11-29 05:04:30 +00:00