Merge "Use partition intead of "root" to assemble filesystem artifacts" into main
diff --git a/aconfig/codegen/init.go b/aconfig/codegen/init.go
index ed0b3ed..34fdca3 100644
--- a/aconfig/codegen/init.go
+++ b/aconfig/codegen/init.go
@@ -33,6 +33,7 @@
` --cache ${in}` +
` --out ${out}.tmp` +
` --allow-instrumentation ${debug}` +
+ ` --new-exported ${new_exported}` +
` && $soong_zip -write_if_changed -jar -o ${out} -C ${out}.tmp -D ${out}.tmp` +
` && rm -rf ${out}.tmp`,
CommandDeps: []string{
@@ -40,7 +41,7 @@
"$soong_zip",
},
Restat: true,
- }, "mode", "debug")
+ }, "mode", "debug", "new_exported")
// For cc_aconfig_library: Generate C++ library
cppRule = pctx.AndroidStaticRule("cc_aconfig_library",
diff --git a/aconfig/codegen/java_aconfig_library.go b/aconfig/codegen/java_aconfig_library.go
index 9f399bf..cd1767b 100644
--- a/aconfig/codegen/java_aconfig_library.go
+++ b/aconfig/codegen/java_aconfig_library.go
@@ -98,14 +98,23 @@
ctx.PropertyErrorf("mode", "exported mode requires its aconfig_declaration has exportable prop true")
}
+ var newExported bool
+ if useNewExported, ok := ctx.Config().GetBuildFlag("RELEASE_ACONFIG_NEW_EXPORTED"); ok {
+ // The build flag (RELEASE_ACONFIG_REQUIRE_ALL_READ_ONLY) is the negation of the aconfig flag
+ // (allow-read-write) for historical reasons.
+ // Bool build flags are always "" for false, and generally "true" for true.
+ newExported = useNewExported == "true"
+ }
+
ctx.Build(pctx, android.BuildParams{
Rule: javaRule,
Input: declarations.IntermediateCacheOutputPath,
Output: srcJarPath,
Description: "aconfig.srcjar",
Args: map[string]string{
- "mode": mode,
- "debug": strconv.FormatBool(ctx.Config().ReleaseReadFromNewStorage()),
+ "mode": mode,
+ "debug": strconv.FormatBool(ctx.Config().ReleaseReadFromNewStorage()),
+ "new_exported": strconv.FormatBool(newExported),
},
})
diff --git a/android/logtags.go b/android/logtags.go
index 7929057..1e92dad 100644
--- a/android/logtags.go
+++ b/android/logtags.go
@@ -16,41 +16,8 @@
import "github.com/google/blueprint"
-func init() {
- RegisterParallelSingletonType("logtags", LogtagsSingleton)
-}
-
type LogtagsInfo struct {
Logtags Paths
}
var LogtagsProviderKey = blueprint.NewProvider[*LogtagsInfo]()
-
-func LogtagsSingleton() Singleton {
- return &logtagsSingleton{}
-}
-
-type logtagsSingleton struct{}
-
-func MergedLogtagsPath(ctx PathContext) OutputPath {
- return PathForIntermediates(ctx, "all-event-log-tags.txt")
-}
-
-func (l *logtagsSingleton) GenerateBuildActions(ctx SingletonContext) {
- var allLogtags Paths
- ctx.VisitAllModules(func(module Module) {
- if !module.ExportedToMake() {
- return
- }
- if logtagsInfo, ok := OtherModuleProvider(ctx, module, LogtagsProviderKey); ok {
- allLogtags = append(allLogtags, logtagsInfo.Logtags...)
- }
- })
-
- builder := NewRuleBuilder(pctx, ctx)
- builder.Command().
- BuiltTool("merge-event-log-tags").
- FlagWithOutput("-o ", MergedLogtagsPath(ctx)).
- Inputs(SortedUniquePaths(allLogtags))
- builder.Build("all-event-log-tags.txt", "merge logtags")
-}
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go
index 81afd02..9ad2cc9 100644
--- a/filesystem/filesystem.go
+++ b/filesystem/filesystem.go
@@ -882,8 +882,7 @@
eventLogtagsPath := etcPath.Join(ctx, "event-log-tags")
builder.Command().Text("mkdir").Flag("-p").Text(etcPath.String())
cmd := builder.Command().BuiltTool("merge-event-log-tags").
- FlagWithArg("-o ", eventLogtagsPath.String()).
- FlagWithInput("-m ", android.MergedLogtagsPath(ctx))
+ FlagWithArg("-o ", eventLogtagsPath.String())
for _, path := range android.SortedKeys(logtagsFilePaths) {
cmd.Text(path)