Add quotes to sourcepath

If Srcs contains only srcjar, sourcepath is null and an error occurs. So
if sourcepath is null, we will use the "-sourcepath "" ".

Test: m -j
Bug: 112397488
Change-Id: I03ac0074fc041203fa1b427d4b4a418af44e85e2
This commit is contained in:
Sundong Ahn 2018-10-05 18:41:09 +09:00
parent b83de950e7
commit 56dce44269
1 changed files with 1 additions and 2 deletions

View File

@ -1307,8 +1307,7 @@ func (d *Droidstubs) initBuilderFlags(ctx android.ModuleContext, implicits *andr
}
flags.classpathArgs = deps.classpath.FormJavaClassPath("-classpath")
flags.sourcepathArgs = "-sourcepath " + strings.Join(d.Javadoc.sourcepaths.Strings(), ":")
flags.sourcepathArgs = "-sourcepath \"" + strings.Join(d.Javadoc.sourcepaths.Strings(), ":") + "\""
return flags, nil
}