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
diff --git a/cc/cmake_snapshot.go b/cc/cmake_snapshot.go
index fb2924a..8f3ad96 100644
--- a/cc/cmake_snapshot.go
+++ b/cc/cmake_snapshot.go
@@ -347,8 +347,11 @@
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 != ""