Add install_in_root to cc_binary
To support init_first_stage, install_in_root property is added to cc_binary. The output is installed to {partition}, rather than {partition}/{mount_point}/bin. Bug: 187196593 Test: build init_first_stage Change-Id: Ibc351645308676ed188f748972eb6312c9cbd64f
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user