From 79fd3d728c2bb7cf3027ba8b7f09829b2d809558 Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Fri, 14 May 2021 16:14:17 +0100 Subject: [PATCH] Allow shared libraries on bootclasspath A previous change treated this as an error in order to try and detect issues with misconfigured java_sdk_library modules and/or bootclasspath_fragment modules but unfortunately this is not always an error, e.g. when migrating a library that was a shared library to the bootclasspath. This change stops treating that as an error. Bug: 179354495 Test: m nothing Change-Id: I4a833ab5f4caf86c6cd340090fc65d2c2f141512 --- java/bootclasspath_fragment.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/java/bootclasspath_fragment.go b/java/bootclasspath_fragment.go index 6d7ab4ae1..68a7ad21d 100644 --- a/java/bootclasspath_fragment.go +++ b/java/bootclasspath_fragment.go @@ -384,11 +384,7 @@ func (b *BootclasspathFragmentModule) GenerateAndroidBuildActions(ctx android.Mo ctx.VisitDirectDeps(func(module android.Module) { tag := ctx.OtherModuleDependencyTag(module) if IsBootclasspathFragmentContentDepTag(tag) { - if sdkLibrary, ok := module.(SdkLibraryDependency); ok && sdkLibrary.sharedLibrary() { - ctx.PropertyErrorf("contents", "invalid module: %s, shared libraries cannot be on the bootclasspath", ctx.OtherModuleName(module)) - } else { - contents = append(contents, module) - } + contents = append(contents, module) } })