aboutsummaryrefslogtreecommitdiff
path: root/cc/library_sdk_member.go
diff options
context:
space:
mode:
authorPaul Duffin <paulduffin@google.com>2020-03-05 14:09:58 +0000
committerPaul Duffin <paulduffin@google.com>2020-03-09 11:10:04 +0000
commit0c394f391978ef598d33e5d8618a428d96c92278 (patch)
treec9330ec9495c821fa7d29d026c608c4a3c791fd3 /cc/library_sdk_member.go
parentb3c763711ada6206922bccc3ef24886149eee913 (diff)
downloadsoong-0c394f391978ef598d33e5d8618a428d96c92278.tar.gz
Copy sdk_version to cc library snapshots
Bug: 142935992 Test: m nothing Change-Id: Ib77c548b1971c841749c87115108af8b092bb809
Diffstat (limited to 'cc/library_sdk_member.go')
-rw-r--r--cc/library_sdk_member.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/cc/library_sdk_member.go b/cc/library_sdk_member.go
index 16b9e6f83..a26269772 100644
--- a/cc/library_sdk_member.go
+++ b/cc/library_sdk_member.go
@@ -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
}