blob: e004cdcdf889003d5700a12923dbd991398a5c68 [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/",
Wei Lia2924462024-01-11 12:04:40 -080028 // Do not block other directories in kernel/, see b/319658303.
29 "kernel/configs/",
30 "kernel/prebuilts/",
31 "kernel/tests/",
Wei Li0d723112024-01-02 17:56:51 -080032 "libcore/",
33 "libnativehelper/",
34 "pdk/",
35 "toolchain/",
36}
37
38func blockAndroidMks(androidMks []string) []string {
39 return android.FilterListPred(androidMks, func(s string) bool {
40 for _, d := range androidmk_denylist {
41 if strings.HasPrefix(s, d) {
42 return false
43 }
44 }
45 return true
46 })
47}