Merge "Show estimated build end time during build" into main
diff --git a/android/androidmk.go b/android/androidmk.go
index 62f82f2..f6e8799 100644
--- a/android/androidmk.go
+++ b/android/androidmk.go
@@ -486,17 +486,6 @@
return generateDistContributionsForMake(distContributions)
}
-// Write the license variables to Make for AndroidMkData.Custom(..) methods that do not call WriteAndroidMkData(..)
-// It's required to propagate the license metadata even for module types that have non-standard interfaces to Make.
-func (a *AndroidMkEntries) WriteLicenseVariables(w io.Writer) {
- AndroidMkEmitAssignList(w, "LOCAL_LICENSE_KINDS", a.EntryMap["LOCAL_LICENSE_KINDS"])
- AndroidMkEmitAssignList(w, "LOCAL_LICENSE_CONDITIONS", a.EntryMap["LOCAL_LICENSE_CONDITIONS"])
- AndroidMkEmitAssignList(w, "LOCAL_NOTICE_FILE", a.EntryMap["LOCAL_NOTICE_FILE"])
- if pn, ok := a.EntryMap["LOCAL_LICENSE_PACKAGE_NAME"]; ok {
- AndroidMkEmitAssignList(w, "LOCAL_LICENSE_PACKAGE_NAME", pn)
- }
-}
-
// fillInEntries goes through the common variable processing and calls the extra data funcs to
// generate and fill in AndroidMkEntries's in-struct data, ready to be flushed to a file.
type fillInEntriesContext interface {
@@ -534,15 +523,6 @@
// Collect make variable assignment entries.
a.SetString("LOCAL_PATH", ctx.ModuleDir(mod))
a.SetString("LOCAL_MODULE", name+a.SubName)
- a.AddStrings("LOCAL_LICENSE_KINDS", base.commonProperties.Effective_license_kinds...)
- a.AddStrings("LOCAL_LICENSE_CONDITIONS", base.commonProperties.Effective_license_conditions...)
- a.AddStrings("LOCAL_NOTICE_FILE", base.commonProperties.Effective_license_text.Strings()...)
- // TODO(b/151177513): Does this code need to set LOCAL_MODULE_IS_CONTAINER ?
- if base.commonProperties.Effective_package_name != nil {
- a.SetString("LOCAL_LICENSE_PACKAGE_NAME", *base.commonProperties.Effective_package_name)
- } else if len(base.commonProperties.Effective_licenses) > 0 {
- a.SetString("LOCAL_LICENSE_PACKAGE_NAME", strings.Join(base.commonProperties.Effective_licenses, " "))
- }
a.SetString("LOCAL_MODULE_CLASS", a.Class)
a.SetString("LOCAL_PREBUILT_MODULE_FILE", a.OutputFile.String())
a.AddStrings("LOCAL_REQUIRED_MODULES", a.Required...)
diff --git a/androidmk/androidmk/android.go b/androidmk/androidmk/android.go
index 954f8d0..276b9ab 100644
--- a/androidmk/androidmk/android.go
+++ b/androidmk/androidmk/android.go
@@ -106,6 +106,7 @@
"LOCAL_ARM_MODE_HACK": "instruction_set",
"LOCAL_SDK_VERSION": "sdk_version",
"LOCAL_MIN_SDK_VERSION": "min_sdk_version",
+ "LOCAL_TARGET_SDK_VERSION": "target_sdk_version",
"LOCAL_NDK_STL_VARIANT": "stl",
"LOCAL_JAR_MANIFEST": "manifest",
"LOCAL_CERTIFICATE": "certificate",
diff --git a/androidmk/androidmk/androidmk_test.go b/androidmk/androidmk/androidmk_test.go
index afde68b..0580ae5 100644
--- a/androidmk/androidmk/androidmk_test.go
+++ b/androidmk/androidmk/androidmk_test.go
@@ -1450,6 +1450,7 @@
LOCAL_PRODUCT_MODULE := true
LOCAL_RESOURCE_DIR := $(LOCAL_PATH)/res
LOCAL_SDK_VERSION := current
+LOCAL_TARGET_SDK_VERSION := target_version
LOCAL_RRO_THEME := FooTheme
include $(BUILD_RRO_PACKAGE)
@@ -1460,6 +1461,7 @@
product_specific: true,
sdk_version: "current",
+ target_sdk_version: "target_version",
theme: "FooTheme",
}
diff --git a/apex/androidmk.go b/apex/androidmk.go
index 6136cbd..4e968ea 100644
--- a/apex/androidmk.go
+++ b/apex/androidmk.go
@@ -245,7 +245,6 @@
fmt.Fprintln(w, "\ninclude $(CLEAR_VARS) # apex.apexBundle")
fmt.Fprintln(w, "LOCAL_PATH :=", moduleDir)
fmt.Fprintln(w, "LOCAL_MODULE :=", name)
- data.Entries.WriteLicenseVariables(w)
fmt.Fprintln(w, "LOCAL_MODULE_CLASS := ETC") // do we need a new class?
fmt.Fprintln(w, "LOCAL_PREBUILT_MODULE_FILE :=", a.outputFile.String())
fmt.Fprintln(w, "LOCAL_MODULE_PATH :=", a.installDir.String())
diff --git a/bpf/bpf.go b/bpf/bpf.go
index ba825cf..58213aa 100644
--- a/bpf/bpf.go
+++ b/bpf/bpf.go
@@ -229,7 +229,6 @@
names = append(names, objName)
fmt.Fprintln(w, "include $(CLEAR_VARS)", " # bpf.bpf.obj")
fmt.Fprintln(w, "LOCAL_MODULE := ", objName)
- data.Entries.WriteLicenseVariables(w)
fmt.Fprintln(w, "LOCAL_PREBUILT_MODULE_FILE :=", obj.String())
fmt.Fprintln(w, "LOCAL_MODULE_STEM :=", obj.Base())
fmt.Fprintln(w, "LOCAL_MODULE_CLASS := ETC")
@@ -239,7 +238,6 @@
}
fmt.Fprintln(w, "include $(CLEAR_VARS)", " # bpf.bpf")
fmt.Fprintln(w, "LOCAL_MODULE := ", name)
- data.Entries.WriteLicenseVariables(w)
android.AndroidMkEmitAssignList(w, "LOCAL_REQUIRED_MODULES", names)
fmt.Fprintln(w, "include $(BUILD_PHONY_PACKAGE)")
},
diff --git a/cc/cc.go b/cc/cc.go
index e215438..a2cbb36 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -141,6 +141,8 @@
// List of libs that need to be excluded for APEX variant
ExcludeLibsForApex []string
+ // List of libs that need to be excluded for non-APEX variant
+ ExcludeLibsForNonApex []string
}
// PathDeps is a struct containing file paths to dependencies of a module.
@@ -728,6 +730,8 @@
// Whether or not this dependency has to be followed for the apex variants
excludeInApex bool
+ // Whether or not this dependency has to be followed for the non-apex variants
+ excludeInNonApex bool
// If true, don't automatically export symbols from the static library into a shared library.
unexportedSymbols bool
@@ -2819,6 +2823,9 @@
if inList(lib, deps.ExcludeLibsForApex) {
depTag.excludeInApex = true
}
+ if inList(lib, deps.ExcludeLibsForNonApex) {
+ depTag.excludeInNonApex = true
+ }
name, version := StubsLibNameAndVersion(lib)
if apiLibraryName, ok := apiImportInfo.SharedLibs[name]; ok && !ctx.OtherModuleExists(name) {
@@ -3335,6 +3342,9 @@
if !apexInfo.IsForPlatform() && libDepTag.excludeInApex {
return
}
+ if apexInfo.IsForPlatform() && libDepTag.excludeInNonApex {
+ return
+ }
depExporterInfo := ctx.OtherModuleProvider(dep, FlagExporterInfoProvider).(FlagExporterInfo)
diff --git a/cc/linker.go b/cc/linker.go
index 257fe86..357d1ce 100644
--- a/cc/linker.go
+++ b/cc/linker.go
@@ -214,6 +214,11 @@
// variant of the C/C++ module.
Exclude_static_libs []string
}
+ Non_apex struct {
+ // list of shared libs that should not be used to build the non-apex
+ // variant of the C/C++ module.
+ Exclude_shared_libs []string
+ }
} `android:"arch_variant"`
// make android::build:GetBuildNumber() available containing the build ID.
@@ -300,6 +305,10 @@
// variants.
deps.ExcludeLibsForApex = append(deps.ExcludeLibsForApex, linker.Properties.Target.Apex.Exclude_shared_libs...)
deps.ExcludeLibsForApex = append(deps.ExcludeLibsForApex, linker.Properties.Target.Apex.Exclude_static_libs...)
+ // Record the libraries that need to be excluded when building for non-APEX variants
+ // for the same reason above. This is used for marking deps and marked deps are
+ // ignored for non-apex variants.
+ deps.ExcludeLibsForNonApex = append(deps.ExcludeLibsForNonApex, linker.Properties.Target.Non_apex.Exclude_shared_libs...)
if Bool(linker.Properties.Use_version_lib) {
deps.WholeStaticLibs = append(deps.WholeStaticLibs, "libbuildversion")
diff --git a/genrule/allowlists.go b/genrule/allowlists.go
index 56b61bf..e6af14f 100644
--- a/genrule/allowlists.go
+++ b/genrule/allowlists.go
@@ -24,18 +24,11 @@
SandboxingDenyModuleList = []string{
// go/keep-sorted start
"CtsApkVerityTestDebugFiles",
- "ScriptGroupTest-rscript",
"aidl-golden-test-build-hook-gen",
"aidl_camera_build_version",
"camera-its",
"chre_atoms_log.h",
- "cronet_aml_base_android_runtime_jni_headers",
- "cronet_aml_base_android_runtime_jni_headers__testing",
- "cronet_aml_base_android_runtime_unchecked_jni_headers",
- "cronet_aml_base_android_runtime_unchecked_jni_headers__testing",
"deqp_spvtools_update_build_version",
- "gen_corrupt_rebootless_apex",
- "gen_key_mismatch_capex",
"libcore-non-cts-tests-txt",
"seller-frontend-service-stub-lite",
"swiftshader_spvtools_update_build_version",
@@ -46,7 +39,6 @@
SandboxingDenyPathList = []string{
// go/keep-sorted start
"art/test",
- "external/cronet",
// go/keep-sorted end
}
)
diff --git a/java/dex.go b/java/dex.go
index dab0836..8af06d5 100644
--- a/java/dex.go
+++ b/java/dex.go
@@ -221,6 +221,11 @@
if err != nil {
ctx.PropertyErrorf("min_sdk_version", "%s", err)
}
+ // V is 35, but we have not bumped the SDK version yet, so check for both.
+ if ctx.Config().PlatformSdkVersion().FinalInt() >= 35 ||
+ ctx.Config().PlatformSdkCodename() == "VanillaIceCream" {
+ flags = append([]string{"-JDcom.android.tools.r8.dexContainerExperiment"}, flags...)
+ }
// If the specified SDK level is 10000, then configure the compiler to use the
// current platform SDK level and to compile the build as a platform build.
diff --git a/phony/phony.go b/phony/phony.go
index 760b79b..a8b651a 100644
--- a/phony/phony.go
+++ b/phony/phony.go
@@ -52,7 +52,6 @@
fmt.Fprintln(w, "\ninclude $(CLEAR_VARS)", " # phony.phony")
fmt.Fprintln(w, "LOCAL_PATH :=", moduleDir)
fmt.Fprintln(w, "LOCAL_MODULE :=", name)
- data.Entries.WriteLicenseVariables(w)
if p.Host() {
fmt.Fprintln(w, "LOCAL_IS_HOST_MODULE := true")
}
diff --git a/rust/config/global.go b/rust/config/global.go
index 64c9460..3802bdd 100644
--- a/rust/config/global.go
+++ b/rust/config/global.go
@@ -25,7 +25,7 @@
pctx = android.NewPackageContext("android/soong/rust/config")
ExportedVars = android.NewExportedVariables(pctx)
- RustDefaultVersion = "1.72.1"
+ RustDefaultVersion = "1.73.0"
RustDefaultBase = "prebuilts/rust/"
DefaultEdition = "2021"
Stdlibs = []string{
diff --git a/sysprop/sysprop_library.go b/sysprop/sysprop_library.go
index fe2cc9c..8bf5f14 100644
--- a/sysprop/sysprop_library.go
+++ b/sysprop/sysprop_library.go
@@ -351,7 +351,6 @@
// Actual implementation libraries are created on LoadHookMutator
fmt.Fprintln(w, "\ninclude $(CLEAR_VARS)", " # sysprop.syspropLibrary")
fmt.Fprintln(w, "LOCAL_MODULE :=", m.Name())
- data.Entries.WriteLicenseVariables(w)
fmt.Fprintf(w, "LOCAL_MODULE_CLASS := FAKE\n")
fmt.Fprintf(w, "LOCAL_MODULE_TAGS := optional\n")
fmt.Fprintf(w, "include $(BUILD_SYSTEM)/base_rules.mk\n\n")