diff options
author | 2023-08-10 17:10:29 +0000 | |
---|---|---|
committer | 2023-08-10 17:10:29 +0000 | |
commit | 1988ccf5bf98582fb3d1cc8968b45506b372af3f (patch) | |
tree | f3561f4a2746e6266113194297bc611c7a08b5c2 /aconfig/init.go | |
parent | b6e0a64bf16124926a3eff45a2ee3d0c31774466 (diff) | |
parent | 457ddef28eafeb79765c058a7f710d0e60567f94 (diff) |
Merge "Implement rust_aconfig_library" into main
Diffstat (limited to 'aconfig/init.go')
-rw-r--r-- | aconfig/init.go | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/aconfig/init.go b/aconfig/init.go index 37167aa5d..cfbd79dd6 100644 --- a/aconfig/init.go +++ b/aconfig/init.go @@ -16,6 +16,7 @@ package aconfig import ( "android/soong/android" + "github.com/google/blueprint" ) @@ -70,6 +71,20 @@ var ( }, }, "gendir") + rustRule = pctx.AndroidStaticRule("rust_aconfig_library", + blueprint.RuleParams{ + Command: `rm -rf ${gendir}` + + ` && mkdir -p ${gendir}` + + ` && ${aconfig} create-rust-lib` + + ` --mode ${mode}` + + ` --cache ${in}` + + ` --out ${gendir}`, + CommandDeps: []string{ + "$aconfig", + "$soong_zip", + }, + }, "gendir", "mode") + // For all_aconfig_declarations allDeclarationsRule = pctx.AndroidStaticRule("all_aconfig_declarations_dump", blueprint.RuleParams{ @@ -92,5 +107,6 @@ func registerBuildComponents(ctx android.RegistrationContext) { ctx.RegisterModuleType("aconfig_value_set", ValueSetFactory) ctx.RegisterModuleType("cc_aconfig_library", CcAconfigLibraryFactory) ctx.RegisterModuleType("java_aconfig_library", JavaDeclarationsLibraryFactory) + ctx.RegisterModuleType("rust_aconfig_library", RustAconfigLibraryFactory) ctx.RegisterParallelSingletonType("all_aconfig_declarations", AllAconfigDeclarationsFactory) } |