diff options
author | Colin Cross <ccross@android.com> | 2015-04-08 11:23:01 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2015-04-08 15:19:36 -0700 |
commit | 6cbb1275648b76377764a96960b7fd206e1a4917 (patch) | |
tree | bba434a10eeccd67ccffdb74f72242c9de8c98e4 /java | |
parent | fce532760f1d22c23df764aefbd3e08592c76105 (diff) | |
download | build_soong-6cbb1275648b76377764a96960b7fd206e1a4917.tar.gz build_soong-6cbb1275648b76377764a96960b7fd206e1a4917.tar.bz2 build_soong-6cbb1275648b76377764a96960b7fd206e1a4917.zip |
Fix missing bootclasspath error in java compiles
If a java library only links against the same jar as bootclasspath,
the jar was being added to classpath and not bootclasspath, leaving
bootclasspath blank and using the default bootclasspath. Reverse
the order so that bootclasspath takes effect.
Change-Id: Ib9fbf01897314a57228013d4aef52606390b0aca
Diffstat (limited to 'java')
-rw-r--r-- | java/java.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/java/java.go b/java/java.go index c6041861..448580ec 100644 --- a/java/java.go +++ b/java/java.go @@ -162,14 +162,14 @@ func (j *javaBase) collectDeps(ctx common.AndroidModuleContext) (classpath []str ctx.VisitDirectDeps(func(module blueprint.Module) { otherName := ctx.OtherModuleName(module) if javaDep, ok := module.(JavaDependency); ok { - if inList(otherName, j.properties.Java_libs) { + if otherName == j.BootClasspath(ctx) { + bootClasspath = javaDep.ClasspathFile() + } else if inList(otherName, j.properties.Java_libs) { classpath = append(classpath, javaDep.ClasspathFile()) } else if inList(otherName, j.properties.Java_static_libs) { classpath = append(classpath, javaDep.ClasspathFile()) classJarSpecs = append(classJarSpecs, javaDep.ClassJarSpecs()...) resourceJarSpecs = append(resourceJarSpecs, javaDep.ResourceJarSpecs()...) - } else if otherName == j.BootClasspath(ctx) { - bootClasspath = javaDep.ClasspathFile() } else { panic(fmt.Errorf("unknown dependency %q for %q", otherName, ctx.ModuleName())) } |