Add install_in_root to cc_binary am: 800d114003

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1736433

Change-Id: If0fc578582e5cb43077251f37b6887f218708848
This commit is contained in:
Inseob Kim
2021-06-18 17:57:28 +00:00
committed by Automerger Merge Worker
3 changed files with 28 additions and 0 deletions

View File

@@ -55,6 +55,7 @@ func init() {
AddNeverAllowRules(createCcSdkVariantRules()...)
AddNeverAllowRules(createUncompressDexRules()...)
AddNeverAllowRules(createMakefileGoalRules()...)
AddNeverAllowRules(createInitFirstStageRules()...)
}
// Add a NeverAllow rule to the set of rules to apply.
@@ -216,6 +217,15 @@ func createMakefileGoalRules() []Rule {
}
}
func createInitFirstStageRules() []Rule {
return []Rule{
NeverAllow().
Without("name", "init_first_stage").
With("install_in_root", "true").
Because("install_in_root is only for init_first_stage."),
}
}
func neverallowMutator(ctx BottomUpMutatorContext) {
m, ok := ctx.Module().(Module)
if !ok {