diff options
Diffstat (limited to 'rust/rust.go')
-rw-r--r-- | rust/rust.go | 59 |
1 files changed, 1 insertions, 58 deletions
diff --git a/rust/rust.go b/rust/rust.go index 240c22178..50f822b53 100644 --- a/rust/rust.go +++ b/rust/rust.go @@ -29,7 +29,6 @@ import ( "android/soong/cc" cc_config "android/soong/cc/config" "android/soong/fuzz" - "android/soong/multitree" "android/soong/rust/config" ) @@ -1218,47 +1217,6 @@ func (mod *Module) depsToPaths(ctx android.ModuleContext) PathDeps { skipModuleList := map[string]bool{} - var apiImportInfo multitree.ApiImportInfo - hasApiImportInfo := false - - ctx.VisitDirectDeps(func(dep android.Module) { - if dep.Name() == "api_imports" { - apiImportInfo, _ = android.OtherModuleProvider(ctx, dep, multitree.ApiImportsProvider) - hasApiImportInfo = true - } - }) - - if hasApiImportInfo { - targetStubModuleList := map[string]string{} - targetOrigModuleList := map[string]string{} - - // Search for dependency which both original module and API imported library with APEX stub exists - ctx.VisitDirectDeps(func(dep android.Module) { - depName := ctx.OtherModuleName(dep) - if apiLibrary, ok := apiImportInfo.ApexSharedLibs[depName]; ok { - targetStubModuleList[apiLibrary] = depName - } - }) - ctx.VisitDirectDeps(func(dep android.Module) { - depName := ctx.OtherModuleName(dep) - if origLibrary, ok := targetStubModuleList[depName]; ok { - targetOrigModuleList[origLibrary] = depName - } - }) - - // Decide which library should be used between original and API imported library - ctx.VisitDirectDeps(func(dep android.Module) { - depName := ctx.OtherModuleName(dep) - if apiLibrary, ok := targetOrigModuleList[depName]; ok { - if cc.ShouldUseStubForApex(ctx, dep) { - skipModuleList[depName] = true - } else { - skipModuleList[apiLibrary] = true - } - } - }) - } - var transitiveAndroidMkSharedLibs []*android.DepSet[string] var directAndroidMkSharedLibs []string @@ -1609,13 +1567,6 @@ func (mod *Module) DepsMutator(actx android.BottomUpMutatorContext) { deps := mod.deps(ctx) var commonDepVariations []blueprint.Variation - apiImportInfo := cc.GetApiImports(mod, actx) - if mod.usePublicApi() || mod.useVendorApi() { - for idx, lib := range deps.SharedLibs { - deps.SharedLibs[idx] = cc.GetReplaceModuleName(lib, apiImportInfo.SharedLibs) - } - } - if ctx.Os() == android.Android { deps.SharedLibs, _ = cc.FilterNdkLibs(mod, ctx.Config(), deps.SharedLibs) } @@ -1708,15 +1659,7 @@ func (mod *Module) DepsMutator(actx android.BottomUpMutatorContext) { variations := []blueprint.Variation{ {Mutator: "link", Variation: "shared"}, } - // For core variant, add a dep on the implementation (if it exists) and its .apiimport (if it exists) - // GenerateAndroidBuildActions will pick the correct impl/stub based on the api_domain boundary - if _, ok := apiImportInfo.ApexSharedLibs[name]; !ok || ctx.OtherModuleExists(name) { - cc.AddSharedLibDependenciesWithVersions(ctx, mod, variations, depTag, name, version, false) - } - - if apiLibraryName, ok := apiImportInfo.ApexSharedLibs[name]; ok { - cc.AddSharedLibDependenciesWithVersions(ctx, mod, variations, depTag, apiLibraryName, version, false) - } + cc.AddSharedLibDependenciesWithVersions(ctx, mod, variations, depTag, name, version, false) } for _, lib := range deps.WholeStaticLibs { |