VNDK listing contains device modules only

Fix a bug where host-only modules were incorrectly listed as VNDK.
Also refactor VndkMutator() / apexVndkDepsMutator() module skipping
logic.

Bug: 158543482
Test: Add unit test to cc/cc_test.go
Change-Id: I50b09f526cbc081149d8241c2a091e3ee48ef4d7
Merged-In: I50b09f526cbc081149d8241c2a091e3ee48ef4d7
(cherry picked from commit bba545e039)
This commit is contained in:
Yo Chiang
2020-06-09 16:15:37 +08:00
committed by Yi-yo Chiang
parent 8d6286befe
commit 97c74da17b
3 changed files with 54 additions and 11 deletions

View File

@@ -819,6 +819,10 @@ func (m *ModuleBase) Host() bool {
return m.Os().Class == Host || m.Os().Class == HostCross
}
func (m *ModuleBase) Device() bool {
return m.Os().Class == Device
}
func (m *ModuleBase) Arch() Arch {
return m.Target().Arch
}