Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit faa2d5f0 authored by Jooyung Han's avatar Jooyung Han
Browse files

Do not add bootstrap libs as providing from apex

Currently, com.android.runtime provides libc/libm/libdl to system. But
they are supposed to be used from symlinks under /system/lib not
directly from runtime apex.

This helps linkerconfig to generate ld.config.txt automatically for
apexes.

Bug: 144664390
Test: m com.android.runtime
      deapexer info com.android.runtime.apex

Change-Id: I1620e88e489fba88a06cc3bd6eb5b86a9b581e4f
parent 387ad5c5
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -1303,11 +1303,12 @@ func (a *apexBundle) GenerateAndroidBuildActions(ctx android.ModuleContext) {
			}
			switch depTag {
			case sharedLibTag:
				if cc, ok := child.(*cc.Module); ok {
					if cc.HasStubsVariants() {
						provideNativeLibs = append(provideNativeLibs, cc.OutputFile().Path().Base())
				if c, ok := child.(*cc.Module); ok {
					// bootstrap bionic libs are treated as provided by system
					if c.HasStubsVariants() && !cc.InstallToBootstrap(c.BaseModuleName(), ctx.Config()) {
						provideNativeLibs = append(provideNativeLibs, c.OutputFile().Path().Base())
					}
					filesInfo = append(filesInfo, apexFileForNativeLibrary(ctx, cc, handleSpecialLibs))
					filesInfo = append(filesInfo, apexFileForNativeLibrary(ctx, c, handleSpecialLibs))
					return true // track transitive dependencies
				} else {
					ctx.PropertyErrorf("native_shared_libs", "%q is not a cc_library or cc_library_shared module", depName)