Deprecate Snapshot build
Existing snapshot code will no longer work from VNDK deprecation, but it
can give confusion to users if we keep code for the snapshot - and it
adds complexity on existing code while it is not in use. This change
removes all snapshot definition except host snapshot and its usage.
Bug: 330100430
Bug: 332986564
Test: AOSP CF build succeeded
Change-Id: Ieb6fa43d5e38315c662ce997bc305b744b367c24
diff --git a/cc/image.go b/cc/image.go
index 50d1b23..76cb09f 100644
--- a/cc/image.go
+++ b/cc/image.go
@@ -22,7 +22,6 @@
"strings"
"android/soong/android"
- "android/soong/snapshot"
"github.com/google/blueprint/proptools"
)
@@ -430,9 +429,6 @@
var productVariants []string
boardVndkVersion := mctx.DeviceConfig().VndkVersion()
- recoverySnapshotVersion := mctx.DeviceConfig().RecoverySnapshotVersion()
- usingRecoverySnapshot := recoverySnapshotVersion != "current" &&
- recoverySnapshotVersion != ""
needVndkVersionVendorVariantForLlndk := false
if boardVndkVersion != "" {
boardVndkApiLevel, err := android.ApiLevelFromUser(mctx, boardVndkVersion)
@@ -478,11 +474,7 @@
// BOARD_VNDK_VERSION. The other modules are regarded as AOSP, or
// PLATFORM_VNDK_VERSION.
if m.HasVendorVariant() {
- if snapshot.IsVendorProprietaryModule(mctx) {
- vendorVariants = append(vendorVariants, boardVndkVersion)
- } else {
- vendorVariants = append(vendorVariants, "")
- }
+ vendorVariants = append(vendorVariants, "")
}
// product_available modules are available to /product.
@@ -503,8 +495,6 @@
"",
boardVndkVersion,
)
- } else if snapshot.IsVendorProprietaryModule(mctx) {
- vendorVariants = append(vendorVariants, boardVndkVersion)
} else {
vendorVariants = append(vendorVariants, "")
}
@@ -548,15 +538,6 @@
coreVariantNeeded = false
}
- // If using a snapshot, the recovery variant under AOSP directories is not needed,
- // except for kernel headers, which needs all variants.
- if !m.KernelHeadersDecorator() &&
- !m.IsSnapshotPrebuilt() &&
- usingRecoverySnapshot &&
- !snapshot.IsRecoveryProprietaryModule(mctx) {
- recoveryVariantNeeded = false
- }
-
for _, variant := range android.FirstUniqueStrings(vendorVariants) {
if variant == "" {
m.AppendExtraVariant(VendorVariation)