From 4669614b92a9ccbaa593bb31d34ec7cfd10756dd Mon Sep 17 00:00:00 2001 From: Mathew Inwood Date: Mon, 2 Aug 2021 16:43:05 +0100 Subject: Update error message for new policy. A new presubmit hook enforces that required information is present in any CL that adds new dependencies to allowed_deps.txt. Test: m Bug: 195303213 Merged-In: I1fb932a52f64f9cbf0d12ead75ffd3d9c2a5e942 Change-Id: I1fb932a52f64f9cbf0d12ead75ffd3d9c2a5e942 --- apex/apex_singleton.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/apex/apex_singleton.go b/apex/apex_singleton.go index 98238428e..6faed7011 100644 --- a/apex/apex_singleton.go +++ b/apex/apex_singleton.go @@ -59,8 +59,15 @@ var ( echo "******************************"; echo "Detected changes to allowed dependencies in updatable modules."; echo "To fix and update packages/modules/common/build/allowed_deps.txt, please run:"; - echo "$$ (croot && packages/modules/common/build/update-apex-allowed-deps.sh)"; - echo "Members of mainline-modularization@google.com will review the changes."; + echo -e "$$ (croot && packages/modules/common/build/update-apex-allowed-deps.sh)\n"; + echo "When submitting the generated CL, you must include the following information"; + echo "in the commit message if you are adding a new dependency:"; + echo "Apex-Size-Increase:"; + echo "Previous-Platform-Support:"; + echo "Aosp-First:"; + echo "Test-Info:"; + echo "You do not need OWNERS approval to submit the change, but mainline-modularization@"; + echo "will periodically review additions and may require changes."; echo -e "******************************\n"; exit 1; fi; -- cgit v1.2.3 From bee6271909635fc3bd9c7d55d09a35e7707680f8 Mon Sep 17 00:00:00 2001 From: Saeid Farivar Asanjan Date: Tue, 14 Sep 2021 18:40:19 +0000 Subject: Add {.aar} support for android_library Bug: 199548380 Test: manually Change-Id: I2c392d3dfc545c23495b03d0f236680fd59e1401 --- java/aar.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/java/aar.go b/java/aar.go index 04727e4b9..a5cf0fd70 100644 --- a/java/aar.go +++ b/java/aar.go @@ -486,6 +486,18 @@ type AndroidLibrary struct { exportedStaticPackages android.Paths } +var _ android.OutputFileProducer = (*AndroidLibrary)(nil) + +// For OutputFileProducer interface +func (a *AndroidLibrary) OutputFiles(tag string) (android.Paths, error) { + switch tag { + case ".aar": + return []android.Path{a.aarFile}, nil + default: + return a.Library.OutputFiles(tag) + } +} + func (a *AndroidLibrary) ExportedProguardFlagFiles() android.Paths { return a.exportedProguardFlagFiles } -- cgit v1.2.3 From b9b436fe17802e1a73e44e27e4a53a5b35b63578 Mon Sep 17 00:00:00 2001 From: Jay Aliomer Date: Thu, 23 Sep 2021 15:49:54 -0400 Subject: Added src and exclude_src to debuggable builds Fixes: 200976245 Test: manually tested Change-Id: I68b6230f30aa2c15e6a80010cd639ea453b4b29e Merged-In: I68b6230f30aa2c15e6a80010cd639ea453b4b29e (cherry picked from commit 85a8afa9e72feff6d804c5d0a0827db63cb55fb9) --- android/variable.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/android/variable.go b/android/variable.go index 0dc5262c7..741d9aed5 100644 --- a/android/variable.go +++ b/android/variable.go @@ -101,6 +101,8 @@ type variableProperties struct { Keep_symbols *bool Keep_symbols_and_debug_frame *bool } + Srcs []string + Exclude_srcs []string } // eng is true for -eng builds, and can be used to turn on additionaly heavyweight debugging -- cgit v1.2.3 From 9db406c81121730ffa54176be19745e2996e64a7 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Mon, 18 Oct 2021 09:54:11 -0700 Subject: Up per-product memory usage to 30 GB Reduce multiproduct_kati parallelism by upping required memory per product to 30 GB. Bug: 201671935 Test: builds Change-Id: Ia756f309459d28e22a49f190a5227a139b356a1f Merged-In: Ia756f309459d28e22a49f190a5227a139b356a1f --- cmd/multiproduct_kati/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/multiproduct_kati/main.go b/cmd/multiproduct_kati/main.go index 55a5470e3..c7adbbd63 100644 --- a/cmd/multiproduct_kati/main.go +++ b/cmd/multiproduct_kati/main.go @@ -244,7 +244,7 @@ func main() { jobs = runtime.NumCPU() / 4 ramGb := int(config.TotalRAM() / 1024 / 1024 / 1024) - if ramJobs := ramGb / 25; ramGb > 0 && jobs > ramJobs { + if ramJobs := ramGb / 30; ramGb > 0 && jobs > ramJobs { jobs = ramJobs } -- cgit v1.2.3 From b7de10739fca89220da03307a3228b32284bd65c Mon Sep 17 00:00:00 2001 From: Ivan Lozano Date: Thu, 15 Jul 2021 15:44:10 -0400 Subject: rust: Remove libtest from stdlibs list libtest does not need to be linked for every module type, so remove it from the stdlibs list. Instead, link it only when building benchmarks or tests. Bug: 193782599 Test: cd external/rust/crates/; mma Test: Rust tests still run correctly. Merged-In: I536be8754da0987e09340744d9ebf668b8e734d0 Change-Id: I536be8754da0987e09340744d9ebf668b8e734d0 --- rust/benchmark.go | 1 + rust/config/global.go | 1 - rust/test.go | 8 ++++++++ rust/testing.go | 2 -- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/rust/benchmark.go b/rust/benchmark.go index b89f5cd9b..0e842435d 100644 --- a/rust/benchmark.go +++ b/rust/benchmark.go @@ -101,6 +101,7 @@ func (benchmark *benchmarkDecorator) compilerFlags(ctx ModuleContext, flags Flag func (benchmark *benchmarkDecorator) compilerDeps(ctx DepsContext, deps Deps) Deps { deps = benchmark.binaryDecorator.compilerDeps(ctx, deps) + deps.Rustlibs = append(deps.Rustlibs, "libtest") deps.Rustlibs = append(deps.Rustlibs, "libcriterion") return deps diff --git a/rust/config/global.go b/rust/config/global.go index 43b49d18b..1b56237b3 100644 --- a/rust/config/global.go +++ b/rust/config/global.go @@ -29,7 +29,6 @@ var ( DefaultEdition = "2018" Stdlibs = []string{ "libstd", - "libtest", } // Mapping between Soong internal arch types and std::env constants. diff --git a/rust/test.go b/rust/test.go index 6caa7b168..e95b47cff 100644 --- a/rust/test.go +++ b/rust/test.go @@ -169,3 +169,11 @@ func RustTestHostFactory() android.Module { func (test *testDecorator) stdLinkage(ctx *depsContext) RustLinkage { return RlibLinkage } + +func (test *testDecorator) compilerDeps(ctx DepsContext, deps Deps) Deps { + deps = test.binaryDecorator.compilerDeps(ctx, deps) + + deps.Rustlibs = append(deps.Rustlibs, "libtest") + + return deps +} diff --git a/rust/testing.go b/rust/testing.go index a0f86b220..1e0c5abbb 100644 --- a/rust/testing.go +++ b/rust/testing.go @@ -162,12 +162,10 @@ func GatherRequiredDepsForTest() string { name: "libtest", crate_name: "test", srcs: ["foo.rs"], - no_stdlibs: true, host_supported: true, vendor_available: true, vendor_ramdisk_available: true, native_coverage: false, - sysroot: true, apex_available: ["//apex_available:platform", "//apex_available:anyapex"], min_sdk_version: "29", } -- cgit v1.2.3 From 08dd45a3b5b20759c5bff79a697a6d11bf973d23 Mon Sep 17 00:00:00 2001 From: Michael Wright Date: Thu, 28 Oct 2021 16:45:21 +0100 Subject: S V2 is now 32 Bug: 204295952 Test: N/A Change-Id: Ib13f30c27cf79c2903e05d3c2cd27d79c4a28668 Merged-In: Ib13f30c27cf79c2903e05d3c2cd27d79c4a28668 --- android/api_levels.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/android/api_levels.go b/android/api_levels.go index 93583bc07..a337371ae 100644 --- a/android/api_levels.go +++ b/android/api_levels.go @@ -290,6 +290,7 @@ func getFinalCodenamesMap(config Config) map[string]int { "Q": 29, "R": 30, "S": 31, + "S-V2": 32, } // TODO: Differentiate "current" and "future". @@ -333,6 +334,7 @@ func getApiLevelsMap(config Config) map[string]int { "Q": 29, "R": 30, "S": 31, + "S-V2": 32, } for i, codename := range config.PlatformVersionActiveCodenames() { apiLevelsMap[codename] = previewAPILevelBase + i -- cgit v1.2.3 From b18a037fc6270ce87778b8756cddb4c8323f86a6 Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Thu, 5 Aug 2021 16:56:18 -0700 Subject: Revert "Time out and dump stacks from R8 processes after 30 minutes" This reverts commit 29c294b2cfb778b77a1556511ba53414254ddbab. The deadlock in R8 was fixed, and the timeout causes problems when RBE is enabled and the R8 action gets stuck in a queue for 30 minutes. Bug: 207767452 Test: checkbuild Change-Id: Ia0c3826aea3288e9db3bdbd4955e1e16c0a38fe3 Merged-In: Ia0c3826aea3288e9db3bdbd4955e1e16c0a38fe3 (cherry picked from commit a832a04db24683228ab60c86fa17cf343168cb70) --- java/config/config.go | 2 -- java/dex.go | 13 ++----------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/java/config/config.go b/java/config/config.go index 273084c85..30c6f91aa 100644 --- a/java/config/config.go +++ b/java/config/config.go @@ -69,8 +69,6 @@ func init() { pctx.StaticVariable("JavacHeapSize", "2048M") pctx.StaticVariable("JavacHeapFlags", "-J-Xmx${JavacHeapSize}") pctx.StaticVariable("DexFlags", "-JXX:OnError='cat hs_err_pid%p.log' -JXX:CICompilerCount=6 -JXX:+UseDynamicNumberOfGCThreads") - // TODO(b/181095653): remove duplicated flags. - pctx.StaticVariable("DexJavaFlags", "-XX:OnError='cat hs_err_pid%p.log' -XX:CICompilerCount=6 -XX:+UseDynamicNumberOfGCThreads -Xmx2G") pctx.StaticVariable("CommonJdkFlags", strings.Join([]string{ `-Xmaxerrs 9999999`, diff --git a/java/dex.go b/java/dex.go index 6bf0143b1..7898e9dff 100644 --- a/java/dex.go +++ b/java/dex.go @@ -84,11 +84,6 @@ func (d *dexer) effectiveOptimizeEnabled() bool { return BoolDefault(d.dexProperties.Optimize.Enabled, d.dexProperties.Optimize.EnabledByDefault) } -func init() { - pctx.HostBinToolVariable("runWithTimeoutCmd", "run_with_timeout") - pctx.SourcePathVariable("jstackCmd", "${config.JavaToolchain}/jstack") -} - var d8, d8RE = pctx.MultiCommandRemoteStaticRules("d8", blueprint.RuleParams{ Command: `rm -rf "$outDir" && mkdir -p "$outDir" && ` + @@ -122,10 +117,7 @@ var r8, r8RE = pctx.MultiCommandRemoteStaticRules("r8", Command: `rm -rf "$outDir" && mkdir -p "$outDir" && ` + `rm -f "$outDict" && rm -rf "${outUsageDir}" && ` + `mkdir -p $$(dirname ${outUsage}) && ` + - // TODO(b/181095653): remove R8 timeout and go back to config.R8Cmd. - `${runWithTimeoutCmd} -timeout 30m -on_timeout '${jstackCmd} $$PID' -- ` + - `$r8Template${config.JavaCmd} ${config.DexJavaFlags} -cp ${config.R8Jar} ` + - `com.android.tools.r8.compatproguard.CompatProguard -injars $in --output $outDir ` + + `$r8Template${config.R8Cmd} ${config.DexFlags} -injars $in --output $outDir ` + `--no-data-resources ` + `-printmapping ${outDict} ` + `-printusage ${outUsage} ` + @@ -136,10 +128,9 @@ var r8, r8RE = pctx.MultiCommandRemoteStaticRules("r8", `$zipTemplate${config.SoongZipCmd} $zipFlags -o $outDir/classes.dex.jar -C $outDir -f "$outDir/classes*.dex" && ` + `${config.MergeZipsCmd} -D -stripFile "**/*.class" $out $outDir/classes.dex.jar $in`, CommandDeps: []string{ - "${config.R8Jar}", + "${config.R8Cmd}", "${config.SoongZipCmd}", "${config.MergeZipsCmd}", - "${runWithTimeoutCmd}", }, }, map[string]*remoteexec.REParams{ "$r8Template": &remoteexec.REParams{ -- cgit v1.2.3