From 1f22939d81f247f681b939a3c5ec9a6f5fa51be3 Mon Sep 17 00:00:00 2001 From: Spandan Das Date: Tue, 23 Jul 2024 22:31:50 +0000 Subject: [PATCH] Ingore CC prebuilts from cmake snapshots The cmake snapshot scripts currently looks at the `cc.Module.compiler` property to determine whether a cc_* module is a prebuilt. As part of b/275273834. some cc_* prebuilt modules which provide APIs will have a non-nil `compiler` to convert the API .txt file to stub .c files. This CL updates the cmake generation script to ignore prebuilts using the `IsPrebuilt` function rather than `cc.Module.compiler` Bug: 275273834 Test: m nothing --no-skip-soong-tests Change-Id: Id8ba22b1c5ad13fb31e75a407a25e97a8040d0b1 --- cc/cmake_snapshot.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cc/cmake_snapshot.go b/cc/cmake_snapshot.go index fb2924a07..8f3ad9639 100644 --- a/cc/cmake_snapshot.go +++ b/cc/cmake_snapshot.go @@ -347,8 +347,11 @@ func (m *CmakeSnapshot) GenerateAndroidBuildActions(ctx android.ModuleContext) { if slices.Contains(ignoredSystemLibs, moduleName) { return false // system libs built in-tree for Android } + if dep.IsPrebuilt() { + return false // prebuilts are not supported + } if dep.compiler == nil { - return false // unsupported module type (e.g. prebuilt) + return false // unsupported module type } isAidlModule := dep.compiler.baseCompilerProps().AidlInterface.Lang != ""