Loading Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -334,6 +334,7 @@ bootstrap_go_package { srcs: [ "rust/config/global.go", "rust/config/toolchain.go", "rust/config/whitelist.go", "rust/config/x86_linux_host.go", "rust/config/x86_64_device.go", ], Loading OWNERS +1 −0 Original line number Diff line number Diff line Loading @@ -4,3 +4,4 @@ per-file ndk_*.go, *gen_stub_libs.py = danalbert@google.com per-file clang.go,global.go = srhines@google.com, chh@google.com, pirama@google.com, yikong@google.com per-file tidy.go = srhines@google.com, chh@google.com per-file lto.go,pgo.go = srhines@google.com, pirama@google.com, yikong@google.com per-file rust/config/whitelist.go = ivanlozano@google.com, jeffv@google.com, jgalenson@google.com, srhines@google.com rust/config/whitelist.go 0 → 100644 +21 −0 Original line number Diff line number Diff line package config var ( RustAllowedPaths = []string{ "external/rust/crates", "external/crosvm", "external/adhd", } 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", } ) rust/rust.go +2 −19 Original line number Diff line number Diff line Loading @@ -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) { Loading Loading
Android.bp +1 −0 Original line number Diff line number Diff line Loading @@ -334,6 +334,7 @@ bootstrap_go_package { srcs: [ "rust/config/global.go", "rust/config/toolchain.go", "rust/config/whitelist.go", "rust/config/x86_linux_host.go", "rust/config/x86_64_device.go", ], Loading
OWNERS +1 −0 Original line number Diff line number Diff line Loading @@ -4,3 +4,4 @@ per-file ndk_*.go, *gen_stub_libs.py = danalbert@google.com per-file clang.go,global.go = srhines@google.com, chh@google.com, pirama@google.com, yikong@google.com per-file tidy.go = srhines@google.com, chh@google.com per-file lto.go,pgo.go = srhines@google.com, pirama@google.com, yikong@google.com per-file rust/config/whitelist.go = ivanlozano@google.com, jeffv@google.com, jgalenson@google.com, srhines@google.com
rust/config/whitelist.go 0 → 100644 +21 −0 Original line number Diff line number Diff line package config var ( RustAllowedPaths = []string{ "external/rust/crates", "external/crosvm", "external/adhd", } 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", } )
rust/rust.go +2 −19 Original line number Diff line number Diff line Loading @@ -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) { Loading