Fix snapshot of a host/device cc_library with stubs

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
Change-Id: I167b47a1374f541aa09d7e045972d740f1d9009c
This commit is contained in:
Paul Duffin
2020-05-04 15:32:08 +01:00
parent 12f67bcf42
commit 2af52380be
3 changed files with 95 additions and 1 deletions

View File

@@ -342,7 +342,11 @@ type nativeLibInfoProperties struct {
// 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