Fix: sysprop module can't be used with whole_static_libs
When a sysprop module is listed in whole_static_libs, it is renamed to
"lib" + <module> to actually refer to the generated C++ library for the
sysprop module.
Test: m (sysprop_test amended)
Change-Id: I05eddb24433d444376787be567830929ef078159
diff --git a/cc/cc.go b/cc/cc.go
index 7b19e98..ddc47ea 100644
--- a/cc/cc.go
+++ b/cc/cc.go
@@ -1225,12 +1225,18 @@
return
}
- actx.AddVariationDependencies([]blueprint.Variation{
- {Mutator: "link", Variation: "static"},
- }, wholeStaticDepTag, deps.WholeStaticLibs...)
-
syspropImplLibraries := syspropImplLibraries(actx.Config())
+ for _, lib := range deps.WholeStaticLibs {
+ depTag := wholeStaticDepTag
+ if impl, ok := syspropImplLibraries[lib]; ok {
+ lib = impl
+ }
+ actx.AddVariationDependencies([]blueprint.Variation{
+ {Mutator: "link", Variation: "static"},
+ }, depTag, lib)
+ }
+
for _, lib := range deps.StaticLibs {
depTag := staticDepTag
if inList(lib, deps.ReexportStaticLibHeaders) {