Retry: Fix snapshot of a host/device cc_library with stubs
Change since last attempt: Disable test that breaks on darwin.
Adds a test that fails with unknown property android.stubs.versions
and then fixes that by marking the field from which that property is
created with 'ignored-on-host' and implemented the isHostVariant on
*osTypeSpecificInfo.
Bug: 155628860
Test: m nothing
Merged-In: Ia4e744c9e799d5adaf8a2f761516f568ec363ad4
Change-Id: Ia4e744c9e799d5adaf8a2f761516f568ec363ad4
(cherry picked from commit 7a1f7f32ab9f230608c0648a62c0d3e9bc402a73)
diff --git a/cc/library_sdk_member.go b/cc/library_sdk_member.go
index 730012c..a7a1de2 100644
--- a/cc/library_sdk_member.go
+++ b/cc/library_sdk_member.go
@@ -342,7 +342,11 @@
// The specific stubs version for the lib variant, or empty string if stubs
// are not in use.
- StubsVersion string
+ //
+ // Marked 'ignored-on-host' as the StubsVersion() from which this is initialized is
+ // not set on host and the stubs.versions property which this is written to is does
+ // not vary by arch so cannot be android specific.
+ StubsVersion string `sdk:"ignored-on-host"`
// outputFile is not exported as it is always arch specific.
outputFile android.Path