Make the cflags property configurable
So that you can use select statements on it. The current modivation
is to convert a module from make to bp with minimal soong config
variable boilerplate.
Bug: 342006386
Bug: 346922064
Test: m nothing --no-skip-soong-tests
Change-Id: I48d5a11ad3aa65c24cc199458634a5fdbeab2f64
diff --git a/cc/cmake_snapshot.go b/cc/cmake_snapshot.go
index ad7beed..b4d1268 100644
--- a/cc/cmake_snapshot.go
+++ b/cc/cmake_snapshot.go
@@ -187,6 +187,10 @@
"getCompilerProperties": func(m *Module) BaseCompilerProperties {
return m.compiler.baseCompilerProps()
},
+ "getCflagsProperty": func(ctx android.ModuleContext, m *Module) []string {
+ cflags := m.compiler.baseCompilerProps().Cflags
+ return cflags.GetOrDefault(ctx, nil)
+ },
"getLinkerProperties": func(m *Module) BaseLinkerProperties {
return m.linker.baseLinkerProps()
},