diff options
| author | Colin Cross <ccross@android.com> | 2019-03-22 21:39:34 -0700 |
|---|---|---|
| committer | Colin Cross <ccross@android.com> | 2019-03-23 04:42:57 +0000 |
| commit | c48428a6bb1102281524f0a3bc252deb34568fe7 (patch) | |
| tree | af375dd459cd838bb4b8218886742a17bfb67450 /java | |
| parent | 66f2e8701e68f18d600c91a7c0779d4b9c8db3fe (diff) | |
| download | build_soong-c48428a6bb1102281524f0a3bc252deb34568fe7.tar.gz build_soong-c48428a6bb1102281524f0a3bc252deb34568fe7.tar.bz2 build_soong-c48428a6bb1102281524f0a3bc252deb34568fe7.zip | |
Don't visit disabled modules with SOONG_COLLECT_JAVA_DEPS=true
Calling AndroidMk() on a disabled module may not be safe because
the module will not have had GenerateAndroidBuildActions() called
on it to initialize the data structures that AndroidMk() expects
to exist. Check module.Enabled() before generating IDE info.
Fixes: 129089976
Test: SOONG_COLLECT_JAVA_DEPS=true m nothing
Change-Id: Icd79088c532c1842801f2bf89d92bc1a67109936
Diffstat (limited to 'java')
| -rw-r--r-- | java/jdeps.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/java/jdeps.go b/java/jdeps.go index 2eaeab8b..18498bef 100644 --- a/java/jdeps.go +++ b/java/jdeps.go @@ -51,6 +51,10 @@ func (j *jdepsGeneratorSingleton) GenerateBuildActions(ctx android.SingletonCont moduleInfos := make(map[string]android.IdeInfo) ctx.VisitAllModules(func(module android.Module) { + if !module.Enabled() { + return + } + ideInfoProvider, ok := module.(android.IDEInfo) if !ok { return |
