Merge "Split findAndCopyBootJars into separate find and copy functions"
diff --git a/android/bazel.go b/android/bazel.go
index 68b040d..03f65f5 100644
--- a/android/bazel.go
+++ b/android/bazel.go
@@ -170,57 +170,103 @@
 		"system/core/property_service/libpropertyinfoparser": Bp2BuildDefaultTrueRecursively,
 		"system/libbase":                  Bp2BuildDefaultTrueRecursively,
 		"system/logging/liblog":           Bp2BuildDefaultTrueRecursively,
+		"external/jemalloc_new":           Bp2BuildDefaultTrueRecursively,
+		"external/fmtlib":                 Bp2BuildDefaultTrueRecursively,
 		"external/arm-optimized-routines": Bp2BuildDefaultTrueRecursively,
 	}
 
 	// Per-module denylist to always opt modules out of both bp2build and mixed builds.
 	bp2buildModuleDoNotConvertList = []string{
 		// Things that transitively depend on unconverted libc_* modules.
-		"libc_common",        // ruperts@, cc_library_static, depends on //bionic/libc:libc_nopthread
-		"libc_common_static", // ruperts@, cc_library_static, depends on //bionic/libc:libc_common
-		"libc_common_shared", // ruperts@, cc_library_static, depends on //bionic/libc:libc_common
-		"libc_nomalloc",      // ruperts@, cc_library_static, depends on //bionic/libc:libc_common
-		"libc_nopthread",     // ruperts@, cc_library_static, depends on lib_bionic_ndk, libc_syscalls, libc_tzcode, libstdc++
+		"libc_nopthread", // http://b/186821550, cc_library_static, depends on //bionic/libc:libc_bionic_ndk (http://b/186822256)
+		//                                                     also depends on //bionic/libc:libc_tzcode (http://b/186822591)
+		//                                                     also depends on //bionic/libc:libstdc++ (http://b/186822597)
+		"libc_common",        // http://b/186821517, cc_library_static, depends on //bionic/libc:libc_nopthread (http://b/186821550)
+		"libc_common_static", // http://b/186824119, cc_library_static, depends on //bionic/libc:libc_common (http://b/186821517)
+		"libc_common_shared", // http://b/186824118, cc_library_static, depends on //bionic/libc:libc_common (http://b/186821517)
+		"libc_nomalloc",      // http://b/186825031, cc_library_static, depends on //bionic/libc:libc_common (http://b/186821517)
 
-		// Things that transitively depend on //system/libbase. libbase doesn't work because:
-		// fmtlib: fatal error: 'cassert' file not found
-		"libbase",                     // eakammer@, cc_library, no such target '//build/bazel/platforms/os:darwin': target 'darwin' not declared
-		"libbase_ndk",                 // eakammer@, cc_library, no such target '//build/bazel/platforms/os:darwin': target 'darwin' not declared
-		"libbionic_spawn_benchmark",   // ruperts@, cc_library_static, depends on libbase, libgoogle-benchmark
-		"libc_malloc_debug",           // ruperts@, cc_library_static, depends on libbase
-		"libc_malloc_debug_backtrace", // ruperts@, cc_library_static, depends on libbase
-		"libcutils",                   // eakammer@, cc_library, depends on libbase, liblog
-		"libcutils_sockets",           // eakammer@, cc_library, depends on libbase, liblog
-		"liblinker_debuggerd_stub",    // ruperts@, cc_library_static, depends on libbase, libz, libziparchive
-		"liblinker_main",              // ruperts@, cc_library_static, depends on libbase, libz, libziparchive
-		"liblinker_malloc",            // ruperts@, cc_library_static, depends on libziparchive, libz, libbase
+		"libbionic_spawn_benchmark", // http://b/186824595, cc_library_static, depends on //external/google-benchmark (http://b/186822740)
+		//                                                                also depends on //system/logging/liblog:liblog (http://b/186822772)
 
-		// Requires non-libc targets, but otherwise works
-		"libc_jemalloc_wrapper", // ruperts@, cc_library_static, depends on //external/jemalloc_new
+		"libc_malloc_debug",           // http://b/186824339, cc_library_static, depends on //system/libbase:libbase (http://b/186823646)
+		"libc_malloc_debug_backtrace", // http://b/186824112, cc_library_static, depends on //external/libcxxabi:libc++demangle (http://b/186823773)
 
-		// Compilation error, seems to be fixable by changing the toolchain definition
-		"libc_bionic_ndk", // ruperts@, cc_library_static, error: ISO C++ requires field designators...
-		"libc_tzcode",     // ruperts@, cc_library_static, error: expected expression
-		"libm",            // jingwen@, cc_library, error: "expected register here" (and many others)
+		"libcutils",         // http://b/186827426, cc_library, depends on //system/core/libprocessgroup:libprocessgroup_headers (http://b/186826841)
+		"libcutils_sockets", // http://b/186826853, cc_library, depends on //system/libbase:libbase (http://b/186826479)
 
-		// Linker error
-		"libc_malloc_hooks", // jingwen@, cc_library, undefined symbol: __malloc_hook, etc.
-		"libstdc++",         // jingwen@, cc_library, undefined symbol: free
+		"liblinker_debuggerd_stub", // http://b/186824327, cc_library_static, depends on //external/zlib:libz (http://b/186823782)
+		//                                                               also depends on //system/libziparchive:libziparchive (http://b/186823656)
+		//                                                               also depends on //system/logging/liblog:liblog (http://b/186822772)
+		"liblinker_main", // http://b/186825989, cc_library_static, depends on //external/zlib:libz (http://b/186823782)
+		//                                                     also depends on //system/libziparchive:libziparchive (http://b/186823656)
+		//                                                     also depends on//system/logging/liblog:liblog (http://b/186822772)
+		"liblinker_malloc", // http://b/186826466, cc_library_static, depends on //external/zlib:libz (http://b/186823782)
+		//                                                       also depends on //system/libziparchive:libziparchive (http://b/186823656)
+		//                                                       also depends on //system/logging/liblog:liblog (http://b/186822772)
+		"libc_jemalloc_wrapper", // cc_library_static, depends on //external/jemalloc_new:libjemalloc5
+		"libc_ndk",              // cc_library_static, depends on libc_bionic_ndk, libc_jemalloc_wrapper, libc_tzcode, libstdc++
+		// libc: http://b/183064430
+		// cc_library, depends on libc_jemalloc_wrapper (and possibly many others)
+		// Also http://b/186816506: Handle static and shared props
+		// Also http://b/186650430: version_script prop support
+		// Also http://b/186651708: pack_relocations prop support
+		// Also http://b/186576099: multilib props support
+		"libc",
 
-		// Includes not found
-		"libbionic_tests_headers_posix", // ruperts@, cc_library_static, 'dirent.h' not found
+		// Compilation or linker error from command line and toolchain inconsistencies.
+		// http://b/186388670: Make Bazel/Ninja command lines more similar.
+		// http://b/186628704: Incorporate Soong's Clang flags into Bazel's toolchains.
+		//
+		"libc_tzcode",  // http://b/186822591: cc_library_static, error: expected expression
+		"libjemalloc5", // http://b/186828626: cc_library, ld.lld: error: undefined symbol: memset, __stack_chk_fail, pthread_mutex_trylock..
+		// libc_bionic_ndk, cc_library_static
+		// Error: ISO C++ requires field designators...
+		// Also http://b/186576099: multilib props support
+		// Also http://b/183595873: product_variables support
+		"libc_bionic_ndk",
+		// libc_malloc_hooks, cc_library
+		// Error: undefined symbol: __malloc_hook, __realloc_hook, __free_hook, __memalign_hook, memset, __errno
+		// These symbols are defined in https://cs.android.com/android/platform/superproject/+/master:bionic/libc/bionic/malloc_common.cpp;l=57-60;drc=9cad8424ff7b0fa63b53cb9919eae31539b8561a
+		// Also http://b/186650430: version_script prop support
+		"libc_malloc_hooks",
+		// http://b/186822597, libstdc++, cc_library
+		// Error: undefined symbol: __errno, syscall, async_safe_fatal_no_abort, abort, malloc, free
+		// Also http://b/186024507: depends on libc through system_shared_libraries.
+		// Also http://b/186650430: version_script prop support
+		// Also http://b/186651708: pack_relocations prop support
+		"libstdc++",
+		// http://b/183064661, libm:
+		// cc_library, error: "expected register here" (and many others)
+		// Also http://b/186024507: depends on libc through system_shared_libraries.
+		// Also http://b/186650430: version_script prop support
+		// Also http://b/186651708: pack_relocations prop support
+		// Also http://b/186576099: multilib props support
+		"libm",
 
-		// b/186024507, missing -isystem bionic/libc/include through the libc/libm/libdl default dependencies if system_shared_libs unset
-		"liblog",                 // cc_library, 'sys/cdefs.h' file not found
-		"libseccomp_policy",      // cc_library, 'linux/filter.h' not found
-		"note_memtag_heap_async", // cc_library_static, error: feature.h not found
-		"note_memtag_heap_sync",  // cc_library_static, error: feature.h not found
+		// http://b/186823769: Needs C++ STL support, includes from unconverted standard libraries in //external/libcxx
+		// c++_static
+		"fmtlib_ndk",  // cc_library, from c++_static
+		"libbase_ndk", // http://b/186826477, cc_library, depends on fmtlib_ndk, which depends on c++_static
+		// libcxx
+		"libBionicBenchmarksUtils", // cc_library_static, fatal error: 'map' file not found, from libcxx
+		"fmtlib",                   // cc_library_static, fatal error: 'cassert' file not found, from libcxx
+		"libbase",                  // http://b/186826479, cc_library, fatal error: 'memory' file not found, from libcxx
 
-		// Other
-		"libBionicBenchmarksUtils", // ruperts@, cc_library_static, 'map' file not found
-		"libc_ndk",                 // ruperts@, cc_library_static, depends on libc_bionic_ndk, libc_jemalloc_wrapper, libc_tzcode, libstdc++
+		// http://b/186024507: Includes errors because of the system_shared_libs default value.
+		// Missing -isystem bionic/libc/include through the libc/libm/libdl
+		// default dependencies if system_shared_libs is unset.
+		"liblog",                 // http://b/186822772: cc_library, 'sys/cdefs.h' file not found
+		"libjemalloc5_jet",       // cc_library, 'sys/cdefs.h' file not found
+		"libseccomp_policy",      // http://b/186476753: cc_library, 'linux/filter.h' not found
+		"note_memtag_heap_async", // http://b/185127353: cc_library_static, error: feature.h not found
+		"note_memtag_heap_sync",  // http://b/185127353: cc_library_static, error: feature.h not found
 
-		"libc", // jingwen@, cc_library, depends on //external/gwp_asan
+		// Tests. Handle later.
+		"libbionic_tests_headers_posix", // http://b/186024507, cc_library_static, sched.h, time.h not found
+		"libjemalloc5_integrationtest",
+		"libjemalloc5_stresstestlib",
+		"libjemalloc5_unittest",
 	}
 
 	// Per-module denylist to opt modules out of mixed builds. Such modules will
diff --git a/android/bazel_paths.go b/android/bazel_paths.go
index 4280bc3..f4b2a7c 100644
--- a/android/bazel_paths.go
+++ b/android/bazel_paths.go
@@ -100,6 +100,10 @@
 	return labels
 }
 
+func BazelLabelForModuleSrcSingle(ctx BazelConversionPathContext, path string) bazel.Label {
+	return BazelLabelForModuleSrcExcludes(ctx, []string{path}, []string(nil)).Includes[0]
+}
+
 // BazelLabelForModuleSrc expects a list of path (relative to local module directory) and module
 // references (":<module>") and returns a bazel.LabelList{} containing the resolved references in
 // paths, relative to the local module, or Bazel-labels (absolute if in a different package or
diff --git a/apex/androidmk.go b/apex/androidmk.go
index 06d3b54..ebf0833 100644
--- a/apex/androidmk.go
+++ b/apex/androidmk.go
@@ -118,10 +118,6 @@
 	seenDataOutPaths := make(map[string]bool)
 
 	for _, fi := range a.filesInfo {
-		if ccMod, ok := fi.module.(*cc.Module); ok && ccMod.Properties.HideFromMake {
-			continue
-		}
-
 		linkToSystemLib := a.linkToSystemLib && fi.transitiveDep && fi.availableToPlatform()
 
 		moduleName := a.fullModuleName(apexBundleName, &fi)
diff --git a/bazel/properties.go b/bazel/properties.go
index 037150d..12dfcaf 100644
--- a/bazel/properties.go
+++ b/bazel/properties.go
@@ -227,6 +227,15 @@
 	HasConfigurableValues() bool
 }
 
+// Represents an attribute whose value is a single label
+type LabelAttribute struct {
+	Value Label
+}
+
+func (LabelAttribute) HasConfigurableValues() bool {
+	return false
+}
+
 // Arch-specific label_list typed Bazel attribute values. This should correspond
 // to the types of architectures supported for compilation in arch.go.
 type labelListArchValues struct {
diff --git a/bp2build/build_conversion.go b/bp2build/build_conversion.go
index 08790d1..bddc524 100644
--- a/bp2build/build_conversion.go
+++ b/bp2build/build_conversion.go
@@ -519,9 +519,7 @@
 	case reflect.Struct:
 		valueIsZero := true
 		for i := 0; i < value.NumField(); i++ {
-			if value.Field(i).CanSet() {
-				valueIsZero = valueIsZero && isZero(value.Field(i))
-			}
+			valueIsZero = valueIsZero && isZero(value.Field(i))
 		}
 		return valueIsZero
 	case reflect.Ptr:
diff --git a/bp2build/cc_library_conversion_test.go b/bp2build/cc_library_conversion_test.go
index aa8200b..0551a18 100644
--- a/bp2build/cc_library_conversion_test.go
+++ b/bp2build/cc_library_conversion_test.go
@@ -277,6 +277,31 @@
     static_deps_for_shared = [":b"],
 )`},
 		},
+		{
+			description:                        "cc_library non-configured version script",
+			moduleTypeUnderTest:                "cc_library",
+			moduleTypeUnderTestFactory:         cc.LibraryFactory,
+			moduleTypeUnderTestBp2BuildMutator: cc.CcLibraryBp2Build,
+			depsMutators:                       []android.RegisterMutatorFunc{cc.RegisterDepsBp2Build},
+			dir:                                "foo/bar",
+			filesystem: map[string]string{
+				"foo/bar/Android.bp": `
+cc_library {
+    name: "a",
+    srcs: ["a.cpp"],
+    version_script: "v.map",
+    bazel_module: { bp2build_available: true },
+}
+`,
+			},
+			bp: soongCcLibraryPreamble,
+			expectedBazelTargets: []string{`cc_library(
+    name = "a",
+    copts = ["-Ifoo/bar"],
+    srcs = ["a.cpp"],
+    version_script = "v.map",
+)`},
+		},
 	}
 
 	dir := "."
diff --git a/bp2build/configurability.go b/bp2build/configurability.go
index 52afb55..050679b 100644
--- a/bp2build/configurability.go
+++ b/bp2build/configurability.go
@@ -30,6 +30,11 @@
 	return value, archSelects, osSelects
 }
 
+func getLabelValue(label bazel.LabelAttribute) (reflect.Value, selects, selects) {
+	value := reflect.ValueOf(label.Value)
+	return value, nil, nil
+}
+
 func getLabelListValues(list bazel.LabelListAttribute) (reflect.Value, selects, selects) {
 	value := reflect.ValueOf(list.Value.Includes)
 	if !list.HasConfigurableValues() {
@@ -54,12 +59,13 @@
 func prettyPrintAttribute(v bazel.Attribute, indent int) (string, error) {
 	var value reflect.Value
 	var archSelects, osSelects selects
-
 	switch list := v.(type) {
 	case bazel.StringListAttribute:
 		value, archSelects, osSelects = getStringListValues(list)
 	case bazel.LabelListAttribute:
 		value, archSelects, osSelects = getLabelListValues(list)
+	case bazel.LabelAttribute:
+		value, archSelects, osSelects = getLabelValue(list)
 	default:
 		return "", fmt.Errorf("Not a supported Bazel attribute type: %s", v)
 	}
diff --git a/cc/bp2build.go b/cc/bp2build.go
index a4db79f..d52b817 100644
--- a/cc/bp2build.go
+++ b/cc/bp2build.go
@@ -246,15 +246,17 @@
 
 // Convenience struct to hold all attributes parsed from linker properties.
 type linkerAttributes struct {
-	deps     bazel.LabelListAttribute
-	linkopts bazel.StringListAttribute
+	deps          bazel.LabelListAttribute
+	linkopts      bazel.StringListAttribute
+	versionScript bazel.LabelAttribute
 }
 
-// bp2BuildParseLinkerProps creates a label list attribute containing the header library deps of a module, including
+// bp2BuildParseLinkerProps parses the linker properties of a module, including
 // configurable attribute values.
 func bp2BuildParseLinkerProps(ctx android.TopDownMutatorContext, module *Module) linkerAttributes {
 	var deps bazel.LabelListAttribute
 	var linkopts bazel.StringListAttribute
+	var versionScript bazel.LabelAttribute
 
 	for _, linkerProps := range module.linker.linkerProps() {
 		if baseLinkerProps, ok := linkerProps.(*BaseLinkerProperties); ok {
@@ -265,6 +267,12 @@
 			libs = android.SortedUniqueStrings(libs)
 			deps = bazel.MakeLabelListAttribute(android.BazelLabelForModuleDeps(ctx, libs))
 			linkopts.Value = baseLinkerProps.Ldflags
+
+			if baseLinkerProps.Version_script != nil {
+				versionScript = bazel.LabelAttribute{
+					Value: android.BazelLabelForModuleSrcSingle(ctx, *baseLinkerProps.Version_script),
+				}
+			}
 			break
 		}
 	}
@@ -294,8 +302,9 @@
 	}
 
 	return linkerAttributes{
-		deps:     deps,
-		linkopts: linkopts,
+		deps:          deps,
+		linkopts:      linkopts,
+		versionScript: versionScript,
 	}
 }
 
diff --git a/cc/library.go b/cc/library.go
index 3b65d8d..50d3f67 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -228,6 +228,7 @@
 	User_link_flags        bazel.StringListAttribute
 	Includes               bazel.StringListAttribute
 	Static_deps_for_shared bazel.LabelListAttribute
+	Version_script         bazel.LabelAttribute
 }
 
 type bazelCcLibrary struct {
@@ -273,6 +274,7 @@
 		Copts:                  compilerAttrs.copts,
 		Linkopts:               linkerAttrs.linkopts,
 		Deps:                   linkerAttrs.deps,
+		Version_script:         linkerAttrs.versionScript,
 		Static_deps_for_shared: sharedAttrs.staticDeps,
 		Includes:               exportedIncludes,
 	}
diff --git a/java/droidstubs.go b/java/droidstubs.go
index 2676f3d..90d9896 100644
--- a/java/droidstubs.go
+++ b/java/droidstubs.go
@@ -283,6 +283,8 @@
 	if Bool(d.properties.Annotations_enabled) {
 		cmd.Flag("--include-annotations")
 
+		cmd.FlagWithArg("--exclude-annotation ", "androidx.annotation.RequiresApi")
+
 		validatingNullability :=
 			strings.Contains(String(d.Javadoc.properties.Args), "--validate-nullability-from-merged-stubs") ||
 				String(d.properties.Validate_nullability_from_list) != ""
diff --git a/java/hiddenapi.go b/java/hiddenapi.go
index bc3b474..a34044f 100644
--- a/java/hiddenapi.go
+++ b/java/hiddenapi.go
@@ -121,13 +121,6 @@
 
 var _ hiddenAPIIntf = (*hiddenAPI)(nil)
 
-// hiddenAPISupportingModule is the interface that is implemented by any module that supports
-// contributing to the hidden API processing.
-type hiddenAPISupportingModule interface {
-	android.Module
-	hiddenAPIIntf
-}
-
 // Initialize the hiddenapi structure
 func (h *hiddenAPI) initHiddenAPI(ctx android.BaseModuleContext, configurationName string) {
 	// If hiddenapi processing is disabled treat this as inactive.
diff --git a/java/platform_bootclasspath.go b/java/platform_bootclasspath.go
index f88823f..4cb02e3 100644
--- a/java/platform_bootclasspath.go
+++ b/java/platform_bootclasspath.go
@@ -239,6 +239,17 @@
 	return defaultBootImageConfig(ctx)
 }
 
+// hiddenAPISupportingModule encapsulates the information provided by any module that contributes to
+// the hidden API processing.
+type hiddenAPISupportingModule struct {
+	module android.Module
+
+	bootDexJar  android.Path
+	flagsCSV    android.Path
+	indexCSV    android.Path
+	metadataCSV android.Path
+}
+
 // generateHiddenAPIBuildActions generates all the hidden API related build rules.
 func (b *platformBootclasspathModule) generateHiddenAPIBuildActions(ctx android.ModuleContext, modules []android.Module, fragments []android.Module) {
 
@@ -261,27 +272,55 @@
 		return
 	}
 
+	// nilPathHandler will check the supplied path and if it is nil then it will either immediately
+	// report an error, or it will defer the error reporting until it is actually used, depending
+	// whether missing dependencies are allowed.
+	var nilPathHandler func(path android.Path, name string, module android.Module) android.Path
+	if ctx.Config().AllowMissingDependencies() {
+		nilPathHandler = func(path android.Path, name string, module android.Module) android.Path {
+			if path == nil {
+				outputPath := android.PathForModuleOut(ctx, "missing", module.Name(), name)
+				path = outputPath
+
+				// Create an error rule that pretends to create the output file but will actually fail if it
+				// is run.
+				ctx.Build(pctx, android.BuildParams{
+					Rule:   android.ErrorRule,
+					Output: outputPath,
+					Args: map[string]string{
+						"error": fmt.Sprintf("missing hidden API file: %s for %s", name, module),
+					},
+				})
+			}
+			return path
+		}
+	} else {
+		nilPathHandler = func(path android.Path, name string, module android.Module) android.Path {
+			if path == nil {
+				ctx.ModuleErrorf("module %s does not provide a %s file", module, name)
+			}
+			return path
+		}
+	}
+
 	hiddenAPISupportingModules := []hiddenAPISupportingModule{}
 	for _, module := range modules {
-		if h, ok := module.(hiddenAPISupportingModule); ok {
-			if h.bootDexJar() == nil {
-				ctx.ModuleErrorf("module %s does not provide a bootDexJar file", module)
-			}
-			if h.flagsCSV() == nil {
-				ctx.ModuleErrorf("module %s does not provide a flagsCSV file", module)
-			}
-			if h.indexCSV() == nil {
-				ctx.ModuleErrorf("module %s does not provide an indexCSV file", module)
-			}
-			if h.metadataCSV() == nil {
-				ctx.ModuleErrorf("module %s does not provide a metadataCSV file", module)
+		if h, ok := module.(hiddenAPIIntf); ok {
+			hiddenAPISupportingModule := hiddenAPISupportingModule{
+				module:      module,
+				bootDexJar:  nilPathHandler(h.bootDexJar(), "bootDexJar", module),
+				flagsCSV:    nilPathHandler(h.flagsCSV(), "flagsCSV", module),
+				indexCSV:    nilPathHandler(h.indexCSV(), "indexCSV", module),
+				metadataCSV: nilPathHandler(h.metadataCSV(), "metadataCSV", module),
 			}
 
+			// If any errors were reported when trying to populate the hiddenAPISupportingModule struct
+			// then don't add it to the list.
 			if ctx.Failed() {
 				continue
 			}
 
-			hiddenAPISupportingModules = append(hiddenAPISupportingModules, h)
+			hiddenAPISupportingModules = append(hiddenAPISupportingModules, hiddenAPISupportingModule)
 		} else {
 			ctx.ModuleErrorf("module %s of type %s does not support hidden API processing", module, ctx.OtherModuleType(module))
 		}
@@ -289,7 +328,7 @@
 
 	moduleSpecificFlagsPaths := android.Paths{}
 	for _, module := range hiddenAPISupportingModules {
-		moduleSpecificFlagsPaths = append(moduleSpecificFlagsPaths, module.flagsCSV())
+		moduleSpecificFlagsPaths = append(moduleSpecificFlagsPaths, module.flagsCSV)
 	}
 
 	flagFileInfo := b.properties.Hidden_api.hiddenAPIFlagFileInfo(ctx)
@@ -315,7 +354,7 @@
 func (b *platformBootclasspathModule) generateHiddenAPIStubFlagsRules(ctx android.ModuleContext, modules []hiddenAPISupportingModule) {
 	bootDexJars := android.Paths{}
 	for _, module := range modules {
-		bootDexJars = append(bootDexJars, module.bootDexJar())
+		bootDexJars = append(bootDexJars, module.bootDexJar)
 	}
 
 	sdkKindToStubPaths := hiddenAPIGatherStubLibDexJarPaths(ctx)
@@ -328,7 +367,7 @@
 func (b *platformBootclasspathModule) generateHiddenAPIIndexRules(ctx android.ModuleContext, modules []hiddenAPISupportingModule) {
 	indexes := android.Paths{}
 	for _, module := range modules {
-		indexes = append(indexes, module.indexCSV())
+		indexes = append(indexes, module.indexCSV)
 	}
 
 	rule := android.NewRuleBuilder(pctx, ctx)
@@ -344,7 +383,7 @@
 func (b *platformBootclasspathModule) generatedHiddenAPIMetadataRules(ctx android.ModuleContext, modules []hiddenAPISupportingModule) {
 	metadataCSVFiles := android.Paths{}
 	for _, module := range modules {
-		metadataCSVFiles = append(metadataCSVFiles, module.metadataCSV())
+		metadataCSVFiles = append(metadataCSVFiles, module.metadataCSV)
 	}
 
 	rule := android.NewRuleBuilder(pctx, ctx)
diff --git a/ui/build/cleanbuild.go b/ui/build/cleanbuild.go
index 6ba497c..19b5690 100644
--- a/ui/build/cleanbuild.go
+++ b/ui/build/cleanbuild.go
@@ -144,7 +144,8 @@
 		productOut("odm"),
 		productOut("odm_dlkm"),
 		productOut("sysloader"),
-		productOut("testcases"))
+		productOut("testcases"),
+		productOut("symbols"))
 }
 
 // Since products and build variants (unfortunately) shared the same