Merge "Use default fallback when generating cc deps" into main
diff --git a/android/variable.go b/android/variable.go
index d144f7d..3b02bc7 100644
--- a/android/variable.go
+++ b/android/variable.go
@@ -132,9 +132,11 @@
Keep_symbols *bool
Keep_symbols_and_debug_frame *bool
}
- Static_libs []string
- Whole_static_libs []string
- Shared_libs []string
+ Static_libs []string
+ Exclude_static_libs []string
+ Whole_static_libs []string
+ Shared_libs []string
+ Jni_libs []string
Cmdline []string
diff --git a/cc/cc.go b/cc/cc.go
index 740be3a..d307be6 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -1867,8 +1867,10 @@
"libdl": true,
"libz": true,
// art apex
+ // TODO(b/234351700): Remove this when com.android.art.debug is gone.
"libandroidio": true,
"libdexfile": true,
+ "libdexfiled": true, // com.android.art.debug only
"libnativebridge": true,
"libnativehelper": true,
"libnativeloader": true,
diff --git a/cc/config/global.go b/cc/config/global.go
index 62a4765..bf2502f 100644
--- a/cc/config/global.go
+++ b/cc/config/global.go
@@ -397,8 +397,8 @@
// prebuilts/clang default settings.
ClangDefaultBase = "prebuilts/clang/host"
- ClangDefaultVersion = "clang-r522817"
- ClangDefaultShortVersion = "18"
+ ClangDefaultVersion = "clang-r530567"
+ ClangDefaultShortVersion = "19"
// Directories with warnings from Android.bp files.
WarningAllowedProjects = []string{
diff --git a/cmd/release_config/release_config_lib/release_configs.go b/cmd/release_config/release_config_lib/release_configs.go
index f2e1388..a4c884c 100644
--- a/cmd/release_config/release_config_lib/release_configs.go
+++ b/cmd/release_config/release_config_lib/release_configs.go
@@ -42,6 +42,10 @@
// Flags declared this directory's flag_declarations/*.textproto
FlagDeclarations []rc_proto.FlagDeclaration
+
+ // Potential aconfig and build flag contributions in this map directory.
+ // This is used to detect errors.
+ FlagValueDirs map[string][]string
}
type ReleaseConfigDirMap map[string]int
@@ -317,6 +321,21 @@
return err
}
+ subDirs := func(subdir string) (ret []string) {
+ if flagVersions, err := os.ReadDir(filepath.Join(dir, subdir)); err == nil {
+ for _, e := range flagVersions {
+ if e.IsDir() && validReleaseConfigName(e.Name()) {
+ ret = append(ret, e.Name())
+ }
+ }
+ }
+ return
+ }
+ m.FlagValueDirs = map[string][]string{
+ "aconfig": subDirs("aconfig"),
+ "flag_values": subDirs("flag_values"),
+ }
+
err = WalkTextprotoFiles(dir, "release_configs", func(path string, d fs.DirEntry, err error) error {
releaseConfigContribution := &ReleaseConfigContribution{path: path, DeclarationIndex: ConfigDirIndex}
LoadMessage(path, &releaseConfigContribution.proto)
@@ -424,6 +443,27 @@
}
}
+ // Look for ignored flagging values. Gather the entire list to make it easier to fix them.
+ errors := []string{}
+ for _, contrib := range configs.ReleaseConfigMaps {
+ dirName := filepath.Dir(contrib.path)
+ for k, names := range contrib.FlagValueDirs {
+ for _, rcName := range names {
+ if config, err := configs.GetReleaseConfig(rcName); err == nil {
+ rcPath := filepath.Join(dirName, "release_configs", fmt.Sprintf("%s.textproto", config.Name))
+ if _, err := os.Stat(rcPath); err != nil {
+ errors = append(errors, fmt.Sprintf("%s exists but %s does not contribute to %s",
+ filepath.Join(dirName, k, rcName), dirName, config.Name))
+ }
+ }
+
+ }
+ }
+ }
+ if len(errors) > 0 {
+ return fmt.Errorf("%s", strings.Join(errors, "\n"))
+ }
+
releaseConfig, err := configs.GetReleaseConfig(targetRelease)
if err != nil {
return err
diff --git a/cmd/release_config/release_config_lib/util.go b/cmd/release_config/release_config_lib/util.go
index 9919c70..b149293 100644
--- a/cmd/release_config/release_config_lib/util.go
+++ b/cmd/release_config/release_config_lib/util.go
@@ -31,8 +31,9 @@
)
var (
- disableWarnings bool
- containerRegexp, _ = regexp.Compile("^[a-z][a-z0-9]*([._][a-z][a-z0-9]*)*$")
+ disableWarnings bool
+ containerRegexp, _ = regexp.Compile("^[a-z][a-z0-9]*([._][a-z][a-z0-9]*)*$")
+ releaseConfigRegexp, _ = regexp.Compile("^[a-z][a-z0-9]*([._][a-z0-9]*)*$")
)
type StringList []string
@@ -179,6 +180,10 @@
return containerRegexp.MatchString(container)
}
+func validReleaseConfigName(name string) bool {
+ return releaseConfigRegexp.MatchString(name)
+}
+
// Returns the default value for release config artifacts.
func GetDefaultOutDir() string {
outEnv := os.Getenv("OUT_DIR")
diff --git a/rust/test.go b/rust/test.go
index 3087d8d..b7ddd06 100644
--- a/rust/test.go
+++ b/rust/test.go
@@ -116,7 +116,8 @@
}
func (test *testDecorator) install(ctx ModuleContext) {
- testInstallBase := "/data/local/tests/unrestricted"
+ // TODO: (b/167308193) Switch to /data/local/tests/unrestricted as the default install base.
+ testInstallBase := "/data/local/tmp"
if ctx.RustModule().InVendorOrProduct() {
testInstallBase = "/data/local/tests/vendor"
}