File tree Expand file tree Collapse file tree 1 file changed +28
-2
lines changed Expand file tree Collapse file tree 1 file changed +28
-2
lines changed Original file line number Diff line number Diff line change 6
6
7
7
"github.com/ARM-software/bob-build/core/backend"
8
8
"github.com/ARM-software/bob-build/core/file"
9
+ "github.com/ARM-software/bob-build/core/tag"
9
10
"github.com/ARM-software/bob-build/internal/utils"
10
11
"github.com/ARM-software/bob-build/internal/warnings"
11
12
"github.com/google/blueprint"
@@ -16,8 +17,33 @@ type androidNinjaGenerator struct {
16
17
}
17
18
18
19
// aliasActions implements generatorBackend.
19
- func (* androidNinjaGenerator ) aliasActions (m * ModuleAlias , ctx blueprint.ModuleContext ) {
20
- GetLogger ().Warn (warnings .AndroidOutOfTreeUnsupportedModule , ctx .BlueprintsFile (), ctx .ModuleName ())
20
+ func (* androidNinjaGenerator ) aliasActions (a * ModuleAlias , ctx blueprint.ModuleContext ) {
21
+ srcs := []string {}
22
+
23
+ /* Only depend on enabled targets */
24
+ ctx .VisitDirectDepsIf (
25
+ func (p blueprint.Module ) bool { return ctx .OtherModuleDependencyTag (p ) == tag .AliasTag },
26
+ func (p blueprint.Module ) {
27
+ if e , ok := p .(enableable ); ok {
28
+ if ! isEnabled (e ) {
29
+ return
30
+ }
31
+ }
32
+ name := ctx .OtherModuleName (p )
33
+ if lib , ok := p .(phonyInterface ); ok {
34
+ name = lib .shortName ()
35
+ }
36
+
37
+ srcs = append (srcs , name )
38
+ })
39
+
40
+ ctx .Build (pctx ,
41
+ blueprint.BuildParams {
42
+ Rule : blueprint .Phony ,
43
+ Inputs : srcs ,
44
+ Outputs : []string {a .Name ()},
45
+ Optional : true ,
46
+ })
21
47
}
22
48
23
49
// binaryActions implements generatorBackend.
You can’t perform that action at this time.
0 commit comments