Merge "Revert "Delete SyspropMutator""
This commit is contained in:
19
cc/cc.go
19
cc/cc.go
@@ -51,6 +51,7 @@ func RegisterCCBuildComponents(ctx android.RegistrationContext) {
|
||||
ctx.BottomUp("test_per_src", TestPerSrcMutator).Parallel()
|
||||
ctx.BottomUp("version", versionMutator).Parallel()
|
||||
ctx.BottomUp("begin", BeginMutator).Parallel()
|
||||
ctx.BottomUp("sysprop_cc", SyspropMutator).Parallel()
|
||||
})
|
||||
|
||||
ctx.PostDepsMutators(func(ctx android.RegisterMutatorsContext) {
|
||||
@@ -2391,8 +2392,18 @@ func (c *Module) DepsMutator(actx android.BottomUpMutatorContext) {
|
||||
}
|
||||
}
|
||||
|
||||
// sysprop_library has to support both C++ and Java. So sysprop_library internally creates one
|
||||
// C++ implementation library and one Java implementation library. When a module links against
|
||||
// sysprop_library, the C++ implementation library has to be linked. syspropImplLibraries is a
|
||||
// map from sysprop_library to implementation library; it will be used in whole_static_libs,
|
||||
// static_libs, and shared_libs.
|
||||
syspropImplLibraries := syspropImplLibraries(actx.Config())
|
||||
|
||||
for _, lib := range deps.WholeStaticLibs {
|
||||
depTag := libraryDependencyTag{Kind: staticLibraryDependency, wholeStatic: true, reexportFlags: true}
|
||||
if impl, ok := syspropImplLibraries[lib]; ok {
|
||||
lib = impl
|
||||
}
|
||||
|
||||
lib = GetReplaceModuleName(lib, GetSnapshot(c, &snapshotInfo, actx).StaticLibs)
|
||||
|
||||
@@ -2410,6 +2421,10 @@ func (c *Module) DepsMutator(actx android.BottomUpMutatorContext) {
|
||||
depTag.excludeInApex = true
|
||||
}
|
||||
|
||||
if impl, ok := syspropImplLibraries[lib]; ok {
|
||||
lib = impl
|
||||
}
|
||||
|
||||
lib = GetReplaceModuleName(lib, GetSnapshot(c, &snapshotInfo, actx).StaticLibs)
|
||||
|
||||
actx.AddVariationDependencies([]blueprint.Variation{
|
||||
@@ -2439,6 +2454,10 @@ func (c *Module) DepsMutator(actx android.BottomUpMutatorContext) {
|
||||
depTag.excludeInApex = true
|
||||
}
|
||||
|
||||
if impl, ok := syspropImplLibraries[lib]; ok {
|
||||
lib = impl
|
||||
}
|
||||
|
||||
name, version := StubsLibNameAndVersion(lib)
|
||||
sharedLibNames = append(sharedLibNames, name)
|
||||
|
||||
|
Reference in New Issue
Block a user