do not include sever_configurable_flags dependency when in
force-read-only-mode
Bug: b/316932568
Test: m --no-skip-soong-tests nothing
Change-Id: I02a7925dd6b5b33107dae1507447f8e7a1991795
diff --git a/aconfig/codegen/cc_aconfig_library.go b/aconfig/codegen/cc_aconfig_library.go
index 8df353d..50cd4de 100644
--- a/aconfig/codegen/cc_aconfig_library.go
+++ b/aconfig/codegen/cc_aconfig_library.go
@@ -77,8 +77,12 @@
ctx.AddDependency(ctx.Module(), ccDeclarationsTag, declarations)
}
- // Add a dependency for the aconfig flags base library
- deps.SharedLibs = append(deps.SharedLibs, baseLibDep)
+ mode := proptools.StringDefault(this.properties.Mode, "production")
+
+ // Add a dependency for the aconfig flags base library if it is not forced read only
+ if mode != "force-read-only" {
+ deps.SharedLibs = append(deps.SharedLibs, baseLibDep)
+ }
// TODO: It'd be really nice if we could reexport this library and not make everyone do it.
return deps