summaryrefslogtreecommitdiff
path: root/java/builder.go
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2018-08-15 20:21:55 -0700
committer Colin Cross <ccross@android.com> 2018-08-16 16:14:09 -0700
commit81440083603fc3723f56f2d5da08d9759e487fde (patch)
tree69c32ad5ebcd0a2c4a4488aaa193cd1399291a18 /java/builder.go
parent3063b78ea57a4c206996332c3eb5cb79f65a0c92 (diff)
Support patch_module in java modules
A few tests that have classes in the java.base module need to pass --patch-module=java.base=<classpath> to javac. Test: m checkbuild Change-Id: I246bad92dcde976969b064aace5e2856e2bac971
Diffstat (limited to 'java/builder.go')
-rw-r--r--java/builder.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/java/builder.go b/java/builder.go
index 4bdea2833..ff5de09bb 100644
--- a/java/builder.go
+++ b/java/builder.go
@@ -375,8 +375,11 @@ func TransformJarJar(ctx android.ModuleContext, outputFile android.WritablePath,
type classpath []android.Path
func (x *classpath) FormJavaClassPath(optName string) string {
+ if optName != "" && !strings.HasSuffix(optName, "=") && !strings.HasSuffix(optName, " ") {
+ optName += " "
+ }
if len(*x) > 0 {
- return optName + " " + strings.Join(x.Strings(), ":")
+ return optName + strings.Join(x.Strings(), ":")
} else {
return ""
}