Add OWNERS for Rust whitelist.

Splits out the Rust paths whitelist into a separate file
under config/ so that OWNERS can be defined for it.

Bug: 141207129
Test: m -j crosvm.experimental
Change-Id: I5effa6783e5c47560b4b1eae12ad0eb9e9ba96fe
This commit is contained in:
Ivan Lozano
2019-09-18 08:42:54 -07:00
parent 9c27df7d4d
commit e169ad70a5
4 changed files with 25 additions and 19 deletions

View File

@@ -29,28 +29,11 @@ var pctx = android.NewPackageContext("android/soong/rust")
func init() {
// Only allow rust modules to be defined for certain projects
rustModuleTypes := []string{
"rust_binary",
"rust_binary_host",
"rust_library",
"rust_library_dylib",
"rust_library_rlib",
"rust_library_host",
"rust_library_host_dylib",
"rust_library_host_rlib",
"rust_proc_macro",
}
rustAllowedPaths := []string{
"external/rust/crates",
"external/crosvm",
"external/adhd",
}
android.AddNeverAllowRules(
android.NeverAllow().
NotIn(rustAllowedPaths...).
ModuleType(rustModuleTypes...))
NotIn(config.RustAllowedPaths...).
ModuleType(config.RustModuleTypes...))
android.RegisterModuleType("rust_defaults", defaultsFactory)
android.PreDepsMutators(func(ctx android.RegisterMutatorsContext) {