Make the WholeStatic/Static/Shared libs properties configurable
So that you can use selects with them.
Bug: 342006386
Bug: 358377461
Test: m nothing --no-skip-soong-tests
Change-Id: I5a8350f670d51b7da411ad5c3cdbf5f2d6cdd63b
diff --git a/cc/cmake_snapshot.go b/cc/cmake_snapshot.go
index 9159156..db1e619 100644
--- a/cc/cmake_snapshot.go
+++ b/cc/cmake_snapshot.go
@@ -204,12 +204,28 @@
return m.compiler.baseCompilerProps()
},
"getCflagsProperty": func(ctx android.ModuleContext, m *Module) []string {
- cflags := m.compiler.baseCompilerProps().Cflags
- return cflags.GetOrDefault(ctx, nil)
+ prop := m.compiler.baseCompilerProps().Cflags
+ return prop.GetOrDefault(ctx, nil)
},
"getLinkerProperties": func(m *Module) BaseLinkerProperties {
return m.linker.baseLinkerProps()
},
+ "getWholeStaticLibsProperty": func(ctx android.ModuleContext, m *Module) []string {
+ prop := m.linker.baseLinkerProps().Whole_static_libs
+ return prop.GetOrDefault(ctx, nil)
+ },
+ "getStaticLibsProperty": func(ctx android.ModuleContext, m *Module) []string {
+ prop := m.linker.baseLinkerProps().Static_libs
+ return prop.GetOrDefault(ctx, nil)
+ },
+ "getSharedLibsProperty": func(ctx android.ModuleContext, m *Module) []string {
+ prop := m.linker.baseLinkerProps().Shared_libs
+ return prop.GetOrDefault(ctx, nil)
+ },
+ "getHeaderLibsProperty": func(ctx android.ModuleContext, m *Module) []string {
+ prop := m.linker.baseLinkerProps().Header_libs
+ return prop.GetOrDefault(ctx, nil)
+ },
"getExtraLibs": getExtraLibs,
"getIncludeDirs": getIncludeDirs,
"mapLibraries": func(ctx android.ModuleContext, m *Module, libs []string, mapping map[string]LibraryMappingProperty) []string {