Skip to content

Commit

Permalink
Fix package path of android/soong/android pctx
Browse files Browse the repository at this point in the history
android/soong/common was renamed to android/soong/android long
ago, but the pctx package path was still "android/soong/common".
This required all users of rules defined in android/soong/android
to import "android/soong/android" and then
pctx.Import("android/soong/common").

Test: m checkbuild
Change-Id: Ic9e8bf25e76dbd61bb1cb1d0e7d095e73c0f279b
  • Loading branch information
colincross committed Apr 2, 2019
1 parent f99aa3c commit 4f78d19
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions build/soong/cil_compat_map.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,32 +22,32 @@ import (
"fmt"
"io"

"github.com/google/blueprint/proptools"
"github.com/google/blueprint"
"github.com/google/blueprint/proptools"
)

var (
pctx = android.NewPackageContext("android/soong/selinux")

combine_maps = pctx.HostBinToolVariable("combine_maps", "combine_maps")
combineMapsCmd = "${combine_maps} -t ${topHalf} -b ${bottomHalf} -o $out"
combine_maps = pctx.HostBinToolVariable("combine_maps", "combine_maps")
combineMapsCmd = "${combine_maps} -t ${topHalf} -b ${bottomHalf} -o $out"
combineMapsRule = pctx.StaticRule(
"combineMapsRule",
blueprint.RuleParams{
Command: combineMapsCmd,
Command: combineMapsCmd,
CommandDeps: []string{"${combine_maps}"},
},
"topHalf",
"bottomHalf",
)

String = proptools.String
String = proptools.String
TopHalfDepTag = dependencyTag{name: "top"}
)

func init() {
android.RegisterModuleType("se_cil_compat_map", cilCompatMapFactory)
pctx.Import("android/soong/common")
pctx.Import("android/soong/android")
}

func cilCompatMapFactory() android.Module {
Expand Down Expand Up @@ -140,17 +140,17 @@ func (c *cilCompatMap) GenerateAndroidBuildActions(ctx android.ModuleContext) {
})

topHalf := expandTopHalf(ctx)
if (topHalf.Valid()) {
if topHalf.Valid() {
out := android.PathForModuleGen(ctx, c.Name())
ctx.ModuleBuild(pctx, android.ModuleBuildParams{
Rule: combineMapsRule,
Rule: combineMapsRule,
Output: out,
Implicits: []android.Path{
topHalf.Path(),
bottomHalf,
},
Args: map[string]string{
"topHalf": topHalf.String(),
"topHalf": topHalf.String(),
"bottomHalf": bottomHalf.String(),
},
})
Expand All @@ -162,7 +162,7 @@ func (c *cilCompatMap) GenerateAndroidBuildActions(ctx android.ModuleContext) {

func (c *cilCompatMap) DepsMutator(ctx android.BottomUpMutatorContext) {
android.ExtractSourcesDeps(ctx, c.properties.Bottom_half)
if (c.properties.Top_half != nil) {
if c.properties.Top_half != nil {
ctx.AddDependency(c, TopHalfDepTag, String(c.properties.Top_half))
}
}
Expand Down

0 comments on commit 4f78d19

Please sign in to comment.