summaryrefslogtreecommitdiff
path: root/android/module_context.go
diff options
context:
space:
mode:
author Yu Liu <yudiliu@google.com> 2024-11-08 23:11:47 +0000
committer Yu Liu <yudiliu@google.com> 2024-11-12 03:48:18 +0000
commitd3228acdc8658e7bd9ef9662c425822ae55fdebf (patch)
treee44aabb46fe66af9168e07d91792d7dd6a724e04 /android/module_context.go
parent48a943f674de35fb78e1e8d7f36b823798c96233 (diff)
Change GetModuleFromPathDep to use ModuleProxy.
Bug: 377723687 Test: Compare ninja and mk files generated. Change-Id: I428b0965b217adb20a792ebde88374e0c6fae9d6
Diffstat (limited to 'android/module_context.go')
-rw-r--r--android/module_context.go10
1 files changed, 6 insertions, 4 deletions
diff --git a/android/module_context.go b/android/module_context.go
index 41cb0ccb2..20149074e 100644
--- a/android/module_context.go
+++ b/android/module_context.go
@@ -16,13 +16,13 @@ package android
import (
"fmt"
- "github.com/google/blueprint/depset"
"path"
"path/filepath"
"slices"
"strings"
"github.com/google/blueprint"
+ "github.com/google/blueprint/depset"
"github.com/google/blueprint/proptools"
)
@@ -439,9 +439,11 @@ func (m *moduleContext) GetMissingDependencies() []string {
return missingDeps
}
-func (m *moduleContext) GetDirectDepWithTag(name string, tag blueprint.DependencyTag) blueprint.Module {
- module, _ := m.getDirectDepInternal(name, tag)
- return module
+func (m *moduleContext) GetDirectDepWithTag(name string, tag blueprint.DependencyTag) Module {
+ if module, _ := m.getDirectDepInternal(name, tag); module != nil {
+ return module.(Module)
+ }
+ return nil
}
func (m *moduleContext) ModuleSubDir() string {