Revert "Rewrite sbox to use a textproto manifest"
This reverts commit 151b9ff0cf7d22b7257defa6aecc39693f1f2b3c.
Reason for revert: broke builds
Change-Id: I69b3b8795d5a36b4fa0debb1af2d433be3c15d6c
diff --git a/cc/gen.go b/cc/gen.go
index 5895b31..134d6d9 100644
--- a/cc/gen.go
+++ b/cc/gen.go
@@ -232,8 +232,7 @@
var yaccRule_ *android.RuleBuilder
yaccRule := func() *android.RuleBuilder {
if yaccRule_ == nil {
- yaccRule_ = android.NewRuleBuilder().Sbox(android.PathForModuleGen(ctx, "yacc"),
- android.PathForModuleGen(ctx, "yacc.sbox.textproto"))
+ yaccRule_ = android.NewRuleBuilder().Sbox(android.PathForModuleGen(ctx, "yacc"))
}
return yaccRule_
}
@@ -262,8 +261,7 @@
deps = append(deps, headerFile)
case ".aidl":
if aidlRule == nil {
- aidlRule = android.NewRuleBuilder().Sbox(android.PathForModuleGen(ctx, "aidl"),
- android.PathForModuleGen(ctx, "aidl.sbox.textproto"))
+ aidlRule = android.NewRuleBuilder().Sbox(android.PathForModuleGen(ctx, "aidl"))
}
cppFile := android.GenPathWithExt(ctx, "aidl", srcFile, "cpp")
depFile := android.GenPathWithExt(ctx, "aidl", srcFile, "cpp.d")
diff --git a/cc/gen_test.go b/cc/gen_test.go
index 41ef95c..4b9a36e 100644
--- a/cc/gen_test.go
+++ b/cc/gen_test.go
@@ -18,8 +18,6 @@
"path/filepath"
"strings"
"testing"
-
- "android/soong/android"
)
func TestGen(t *testing.T) {
@@ -58,14 +56,13 @@
}`)
aidl := ctx.ModuleForTests("libfoo", "android_arm_armv7-a-neon_shared").Rule("aidl")
- aidlManifest := ctx.ModuleForTests("libfoo", "android_arm_armv7-a-neon_shared").Output("aidl.sbox.textproto")
libfoo := ctx.ModuleForTests("libfoo", "android_arm_armv7-a-neon_shared").Module().(*Module)
if !inList("-I"+filepath.Dir(aidl.Output.String()), libfoo.flags.Local.CommonFlags) {
t.Errorf("missing aidl includes in global flags")
}
- aidlCommand := android.RuleBuilderSboxProtoForTests(t, aidlManifest).Commands[0].GetCommand()
+ aidlCommand := aidl.RuleParams.Command
if !strings.Contains(aidlCommand, "-Isub") {
t.Errorf("aidl command for c.aidl should contain \"-Isub\", but was %q", aidlCommand)
}