Generate unversioned cc_prebuilt_library_shared
Without this the generated snapshot build file will not load. Bug: 143678475 Test: m nothing and check output for dummy sdk Change-Id: I252ed01280aeceb4ff40b2d9de2bc2bf88858ea9
This commit is contained in:
parent
50e7900744
commit
9010250a16
|
@ -401,11 +401,26 @@ func buildSharedNativeLibSnapshot(ctx android.ModuleContext, info *nativeLibInfo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
info.generatePrebuiltLibrary(ctx, builder, true)
|
||||||
|
|
||||||
|
// This module is for the case when the source tree for the unversioned module
|
||||||
|
// doesn't exist (i.e. building in an unbundled tree). "prefer:" is set to false
|
||||||
|
// so that this module does not eclipse the unversioned module if it exists.
|
||||||
|
info.generatePrebuiltLibrary(ctx, builder, false)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (info *nativeLibInfo) generatePrebuiltLibrary(ctx android.ModuleContext, builder android.SnapshotBuilder, versioned bool) {
|
||||||
bp := builder.AndroidBpFile()
|
bp := builder.AndroidBpFile()
|
||||||
bp.Printfln("cc_prebuilt_library_shared {")
|
bp.Printfln("cc_prebuilt_library_shared {")
|
||||||
bp.Indent()
|
bp.Indent()
|
||||||
bp.Printfln("name: %q,", builder.VersionedSdkMemberName(info.name))
|
name := info.name
|
||||||
bp.Printfln("sdk_member_name: %q,", info.name)
|
if versioned {
|
||||||
|
bp.Printfln("name: %q,", builder.VersionedSdkMemberName(name))
|
||||||
|
bp.Printfln("sdk_member_name: %q,", name)
|
||||||
|
} else {
|
||||||
|
bp.Printfln("name: %q,", name)
|
||||||
|
bp.Printfln("prefer: false,")
|
||||||
|
}
|
||||||
|
|
||||||
// a function for emitting include dirs
|
// a function for emitting include dirs
|
||||||
printExportedDirsForNativeLibs := func(lib archSpecificNativeLibInfo, systemInclude bool) {
|
printExportedDirsForNativeLibs := func(lib archSpecificNativeLibInfo, systemInclude bool) {
|
||||||
|
|
Loading…
Reference in New Issue