Add new storage deps in forced read-only mode

Bug: 328444881
Test: m
Change-Id: I26d5d5c96414a62f2f83eb4d725e69cea61214da
This commit is contained in:
Ted Bauer 2024-05-01 00:30:17 +00:00
parent 3210194259
commit c3031c5c7b
2 changed files with 22 additions and 3 deletions

View file

@ -88,10 +88,13 @@ func (this *CcAconfigLibraryCallbacks) GeneratorDeps(ctx cc.DepsContext, deps cc
if mode != "force-read-only" {
deps.SharedLibs = append(deps.SharedLibs, baseLibDep)
deps.SharedLibs = append(deps.SharedLibs, libAconfigStorageReadApiCcDep)
deps.SharedLibs = append(deps.SharedLibs, libLogDep)
deps.SharedLibs = append(deps.SharedLibs, libBaseDep)
}
// TODO: after storage migration is over, don't add these in force-read-only-mode.
deps.SharedLibs = append(deps.SharedLibs, libAconfigStorageReadApiCcDep)
deps.SharedLibs = append(deps.SharedLibs, libBaseDep)
deps.SharedLibs = append(deps.SharedLibs, libLogDep)
// TODO: It'd be really nice if we could reexport this library and not make everyone do it.
return deps

View file

@ -249,6 +249,22 @@ func TestForceReadOnly(t *testing.T) {
aconfig_declarations: "my_aconfig_declarations",
mode: "force-read-only",
}
cc_library {
name: "libbase",
srcs: ["libbase.cc"],
}
cc_library {
name: "liblog",
srcs: ["liblog.cc"],
}
cc_library {
name: "libaconfig_storage_read_api_cc",
srcs: ["libaconfig_storage_read_api_cc.cc"],
}
`))
module := result.ModuleForTests("my_cc_aconfig_library", "android_arm64_armv8-a_shared").Module()