diff options
author | 2025-03-19 10:25:08 -0700 | |
---|---|---|
committer | 2025-03-19 10:25:08 -0700 | |
commit | db1fc9d6dd4b5dfe437daeec283c6f770d6e28bf (patch) | |
tree | db38f49bd3b76be2d6bd25695b63fab99a7cd1a2 | |
parent | 8f1e1abfcbd59d89316d8b309038b8745694ef27 (diff) | |
parent | ec73a9f3e977a1cd9b765ef2cb9e45b565000206 (diff) |
Merge "Remove genrule sandbox allowlist" into main
-rw-r--r-- | genrule/Android.bp | 1 | ||||
-rw-r--r-- | genrule/allowlists.go | 22 | ||||
-rw-r--r-- | genrule/genrule.go | 21 |
3 files changed, 0 insertions, 44 deletions
diff --git a/genrule/Android.bp b/genrule/Android.bp index 49df48075..b82f2a9c3 100644 --- a/genrule/Android.bp +++ b/genrule/Android.bp @@ -14,7 +14,6 @@ bootstrap_go_package { "soong-shared", ], srcs: [ - "allowlists.go", "genrule.go", "locations.go", ], diff --git a/genrule/allowlists.go b/genrule/allowlists.go deleted file mode 100644 index 45a7f727c..000000000 --- a/genrule/allowlists.go +++ /dev/null @@ -1,22 +0,0 @@ -// Copyright 2023 Google Inc. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -package genrule - -var ( - SandboxingDenyModuleList = []string{ - // go/keep-sorted start - // go/keep-sorted end - } -) diff --git a/genrule/genrule.go b/genrule/genrule.go index 710ec9555..a7c09e76c 100644 --- a/genrule/genrule.go +++ b/genrule/genrule.go @@ -969,30 +969,9 @@ func DefaultsFactory(props ...interface{}) android.Module { return module } -var sandboxingAllowlistKey = android.NewOnceKey("genruleSandboxingAllowlistKey") - -type sandboxingAllowlistSets struct { - sandboxingDenyModuleSet map[string]bool -} - -func getSandboxingAllowlistSets(ctx android.PathContext) *sandboxingAllowlistSets { - return ctx.Config().Once(sandboxingAllowlistKey, func() interface{} { - sandboxingDenyModuleSet := map[string]bool{} - - android.AddToStringSet(sandboxingDenyModuleSet, SandboxingDenyModuleList) - return &sandboxingAllowlistSets{ - sandboxingDenyModuleSet: sandboxingDenyModuleSet, - } - }).(*sandboxingAllowlistSets) -} - func getSandboxedRuleBuilder(ctx android.ModuleContext, r *android.RuleBuilder) *android.RuleBuilder { if !ctx.DeviceConfig().GenruleSandboxing() { return r.SandboxTools() } - sandboxingAllowlistSets := getSandboxingAllowlistSets(ctx) - if sandboxingAllowlistSets.sandboxingDenyModuleSet[ctx.ModuleName()] { - return r.SandboxTools() - } return r.SandboxInputs() } |