diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2019-07-17 03:11:37 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2019-07-17 03:11:37 +0000 |
commit | 8fa121dc8905d109dc9461c7810c8d70449132f8 (patch) | |
tree | 1425a089580634b8285954733e7ea2bca06e3f4a | |
parent | 4358b7cc045b62ca28015a88506469f571d92d52 (diff) | |
parent | 9863d53618714a36c3f254d949497a7eb2d11863 (diff) | |
download | build_soong-android-cts-10.0_r2.tar.gz build_soong-android-cts-10.0_r2.tar.bz2 build_soong-android-cts-10.0_r2.zip |
Merge cherrypicks of [8673593, 8673409, 8673796, 8673797, 8673798, 8673855, 8673151, 8673594, 8673499, 8673799, 8673895, 8673896] into qt-releaseandroid-vts-10.0_r6android-vts-10.0_r5android-vts-10.0_r4android-vts-10.0_r3android-vts-10.0_r2android-vts-10.0_r1android-security-10.0.0_r48android-cts-10.0_r6android-cts-10.0_r5android-cts-10.0_r4android-cts-10.0_r3android-cts-10.0_r2android-cts-10.0_r1android-10.0.0_r6android-10.0.0_r5android-10.0.0_r47android-10.0.0_r46android-10.0.0_r4android-10.0.0_r3android-10.0.0_r2android-10.0.0_r17android-10.0.0_r11android-10.0.0_r10android-10.0.0_r1
Change-Id: I4173c76b7399b84f27ab3c513f11b82a78320e77
-rw-r--r-- | apex/apex.go | 11 | ||||
-rw-r--r-- | java/hiddenapi_singleton.go | 4 | ||||
-rw-r--r-- | java/java.go | 8 | ||||
-rw-r--r-- | java/sdk_library.go | 11 |
4 files changed, 20 insertions, 14 deletions
diff --git a/apex/apex.go b/apex/apex.go index 04b667f8..87c54f3b 100644 --- a/apex/apex.go +++ b/apex/apex.go @@ -1327,10 +1327,13 @@ func (p *Prebuilt) installable() bool { } func (p *Prebuilt) DepsMutator(ctx android.BottomUpMutatorContext) { - // If the device is configured to use flattened APEX, don't set - // p.properties.Source so that the prebuilt module (which is - // a non-flattened APEX) is not used. - forceDisable := ctx.Config().FlattenApex() && !ctx.Config().UnbundledBuild() + // If the device is configured to use flattened APEX, force disable the prebuilt because + // the prebuilt is a non-flattened one. + forceDisable := ctx.Config().FlattenApex() + + // Force disable the prebuilts when we are doing unbundled build. We do unbundled build + // to build the prebuilts themselves. + forceDisable = forceDisable || ctx.Config().UnbundledBuild() // b/137216042 don't use prebuilts when address sanitizer is on forceDisable = forceDisable || android.InList("address", ctx.Config().SanitizeDevice()) || diff --git a/java/hiddenapi_singleton.go b/java/hiddenapi_singleton.go index b1ddab48..09936ea7 100644 --- a/java/hiddenapi_singleton.go +++ b/java/hiddenapi_singleton.go @@ -61,7 +61,7 @@ func (h *hiddenAPISingleton) GenerateBuildActions(ctx android.SingletonContext) stubFlagsRule(ctx) // These rules depend on files located in frameworks/base, skip them if running in a tree that doesn't have them. - if ctx.Config().FrameworksBaseDirExists(ctx) && !ctx.Config().UnbundledBuild() { + if ctx.Config().FrameworksBaseDirExists(ctx) { h.flags = flagsRule(ctx) h.metadata = metadataRule(ctx) } else { @@ -94,7 +94,7 @@ func stubFlagsRule(ctx android.SingletonContext) { // Add the android.test.base to the set of stubs only if the android.test.base module is on // the boot jars list as the runtime will only enforce hiddenapi access against modules on // that list. - if inList("android.test.base", ctx.Config().BootJars()) { + if inList("android.test.base", ctx.Config().BootJars()) && !ctx.Config().UnbundledBuildUsePrebuiltSdks() { publicStubModules = append(publicStubModules, "android.test.base.stubs") } diff --git a/java/java.go b/java/java.go index ff6bbacc..bf738c4d 100644 --- a/java/java.go +++ b/java/java.go @@ -1270,11 +1270,9 @@ func (j *Module) compile(ctx android.ModuleContext, extraSrcJars ...android.Path return } - if !ctx.Config().UnbundledBuild() { - // Hidden API CSV generation and dex encoding - dexOutputFile = j.hiddenAPI.hiddenAPI(ctx, dexOutputFile, j.implementationJarFile, - j.deviceProperties.UncompressDex) - } + // Hidden API CSV generation and dex encoding + dexOutputFile = j.hiddenAPI.hiddenAPI(ctx, dexOutputFile, j.implementationJarFile, + j.deviceProperties.UncompressDex) // merge dex jar with resources if necessary if j.resourceJar != nil { diff --git a/java/sdk_library.go b/java/sdk_library.go index 974131cf..84be4dda 100644 --- a/java/sdk_library.go +++ b/java/sdk_library.go @@ -162,15 +162,20 @@ var _ Dependency = (*SdkLibrary)(nil) var _ SdkLibraryDependency = (*SdkLibrary)(nil) func (module *SdkLibrary) DepsMutator(ctx android.BottomUpMutatorContext) { + useBuiltStubs := !ctx.Config().UnbundledBuildUsePrebuiltSdks() // Add dependencies to the stubs library - ctx.AddVariationDependencies(nil, publicApiStubsTag, module.stubsName(apiScopePublic)) + if useBuiltStubs { + ctx.AddVariationDependencies(nil, publicApiStubsTag, module.stubsName(apiScopePublic)) + } ctx.AddVariationDependencies(nil, publicApiFileTag, module.docsName(apiScopePublic)) if !Bool(module.properties.No_standard_libs) { - ctx.AddVariationDependencies(nil, systemApiStubsTag, module.stubsName(apiScopeSystem)) + if useBuiltStubs { + ctx.AddVariationDependencies(nil, systemApiStubsTag, module.stubsName(apiScopeSystem)) + ctx.AddVariationDependencies(nil, testApiStubsTag, module.stubsName(apiScopeTest)) + } ctx.AddVariationDependencies(nil, systemApiFileTag, module.docsName(apiScopeSystem)) ctx.AddVariationDependencies(nil, testApiFileTag, module.docsName(apiScopeTest)) - ctx.AddVariationDependencies(nil, testApiStubsTag, module.stubsName(apiScopeTest)) } module.Library.deps(ctx) |