blob: b2266b2c0c0d653073d17153d077a70a02cb992f [file] [log] [blame]
Wei Li0d723112024-01-02 17:56:51 -08001// Copyright 2024 Google Inc. All rights reserved.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package build
16
17import (
18 "strings"
19
20 "android/soong/android"
21)
22
23var androidmk_denylist []string = []string{
24 "chained_build_config/",
25 "cts/",
26 "dalvik/",
27 "developers/",
28 "kernel/",
29 "libcore/",
30 "libnativehelper/",
31 "pdk/",
32 "toolchain/",
33}
34
35func blockAndroidMks(androidMks []string) []string {
36 return android.FilterListPred(androidMks, func(s string) bool {
37 for _, d := range androidmk_denylist {
38 if strings.HasPrefix(s, d) {
39 return false
40 }
41 }
42 return true
43 })
44}