exports LOCAL_SOONG_VNDK_VERSION for VNDK libs

For vndk_prebuilt_shared module, it is set by 'version' property.
For other vndk libs(e.g. cc_library with vndk.enabled), it is set as
PLATFORM_VNDK_VERSION.

Background:
To support "skip installing current VNDK".

You can get a system.img without current VNDK libs.
This may help when you want a smaller system.img given that the image
will be used with a specific version (not current) of vendor image.

Bug: 132140714
Test: m TARGET_SKIP_CURRENT_VNDK=true && see if current VNDK is not
installed

Change-Id: I1c603efc3e95fe8bdf870f2de91994077899fca7
diff --git a/cc/androidmk.go b/cc/androidmk.go
index c7883e2..d7f7448 100644
--- a/cc/androidmk.go
+++ b/cc/androidmk.go
@@ -89,6 +89,9 @@
 				fmt.Fprintln(w, "LOCAL_SOONG_LINK_TYPE :=", c.makeLinkType)
 				if c.useVndk() {
 					fmt.Fprintln(w, "LOCAL_USE_VNDK := true")
+					if c.isVndk() && !c.static() {
+						fmt.Fprintln(w, "LOCAL_SOONG_VNDK_VERSION := "+c.vndkVersion())
+					}
 				}
 			},
 		},