Merge "Copy sdk_version to cc library snapshots"
This commit is contained in:
commit
71754bf640
|
@ -97,6 +97,13 @@ func (mt *librarySdkMemberType) IsInstance(module android.Module) bool {
|
|||
|
||||
func (mt *librarySdkMemberType) AddPrebuiltModule(sdkModuleContext android.ModuleContext, builder android.SnapshotBuilder, member android.SdkMember) android.BpModule {
|
||||
pbm := builder.AddPrebuiltModule(member, mt.prebuiltModuleType)
|
||||
|
||||
ccModule := member.Variants()[0].(*Module)
|
||||
|
||||
sdkVersion := ccModule.SdkVersion()
|
||||
if sdkVersion != "" {
|
||||
pbm.AddProperty("sdk_version", sdkVersion)
|
||||
}
|
||||
return pbm
|
||||
}
|
||||
|
||||
|
|
|
@ -517,6 +517,7 @@ func TestHostSnapshotWithCcSharedLibrary(t *testing.T) {
|
|||
},
|
||||
system_shared_libs: [],
|
||||
stl: "none",
|
||||
sdk_version: "minimum",
|
||||
}
|
||||
`)
|
||||
|
||||
|
@ -529,6 +530,7 @@ cc_prebuilt_library_shared {
|
|||
sdk_member_name: "mynativelib",
|
||||
device_supported: false,
|
||||
host_supported: true,
|
||||
sdk_version: "minimum",
|
||||
export_include_dirs: ["include/include"],
|
||||
arch: {
|
||||
x86_64: {
|
||||
|
@ -549,6 +551,7 @@ cc_prebuilt_library_shared {
|
|||
prefer: false,
|
||||
device_supported: false,
|
||||
host_supported: true,
|
||||
sdk_version: "minimum",
|
||||
export_include_dirs: ["include/include"],
|
||||
arch: {
|
||||
x86_64: {
|
||||
|
|
Loading…
Reference in New Issue