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
This commit is contained in:
Spandan Das
2024-07-23 22:31:50 +00:00
parent e20c56cdf0
commit 1f22939d81

View File

@@ -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 != ""