From 65ca36a72e7c1b5f353208faa94e665b2625e51a Mon Sep 17 00:00:00 2001 From: Inseob Kim Date: Thu, 11 Jun 2020 13:55:45 +0900 Subject: [PATCH] Exclude kernel_headers from vendor snapshot Vendor snapshot is supposed to have AOSP-defined modules which are installed to vendor. kernel_headers are excluded from snapshot because they always depend on vendor, regardless of locations they are defined. Bug: 157106227 Test: m vendor-snapshot Change-Id: If47634678797973266fcf502739216daf28ad790 --- cc/vendor_snapshot.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cc/vendor_snapshot.go b/cc/vendor_snapshot.go index ea94544e3..4dad730d6 100644 --- a/cc/vendor_snapshot.go +++ b/cc/vendor_snapshot.go @@ -548,6 +548,10 @@ func isVendorSnapshotModule(m *Module, moduleDir string) bool { if !m.IsForPlatform() || m.isSnapshotPrebuilt() || !m.inVendor() { return false } + // skip kernel_headers which always depend on vendor + if _, ok := m.linker.(*kernelHeadersDecorator); ok { + return false + } // Libraries if l, ok := m.linker.(snapshotLibraryInterface); ok {