diff options
author | Haamed Gheibi <haamed@google.com> | 2022-02-17 15:24:45 -0800 |
---|---|---|
committer | Haamed Gheibi <haamed@google.com> | 2022-02-22 09:46:40 -0800 |
commit | eb72b43eb91c0982e40d41502e547ef118348cc2 (patch) | |
tree | d9846ed8d6dedb39ad41a80cca41fc295d4724fe | |
parent | 7943f12f716132a29b244ed6f8713c3937bce7ae (diff) | |
parent | ca3328fb3c28ecf5a10a17abda2337ac1733c286 (diff) |
Merge SP2A.220305.013
Bug: 220074017
Change-Id: Ia2198b401a3a907c785316e0ef4c00bf27fa59b1
-rw-r--r-- | android/api_levels.go | 2 | ||||
-rw-r--r-- | android/variable.go | 2 | ||||
-rw-r--r-- | apex/apex_singleton.go | 11 | ||||
-rw-r--r-- | cmd/multiproduct_kati/main.go | 2 | ||||
-rw-r--r-- | java/aar.go | 12 | ||||
-rw-r--r-- | java/config/config.go | 2 | ||||
-rw-r--r-- | java/dex.go | 13 | ||||
-rw-r--r-- | rust/benchmark.go | 1 | ||||
-rw-r--r-- | rust/config/global.go | 1 | ||||
-rw-r--r-- | rust/test.go | 8 | ||||
-rw-r--r-- | rust/testing.go | 2 |
11 files changed, 37 insertions, 19 deletions
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 diff --git a/android/variable.go b/android/variable.go index f152ad206..f51fe83cb 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 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; 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 } 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 } 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{ 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", } |