summaryrefslogtreecommitdiff
path: root/java/java.go
diff options
context:
space:
mode:
author Alex Humesky <ahumesky@google.com> 2020-06-16 20:08:58 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2020-06-16 20:08:58 +0000
commitc7f8b74365270ef461009694874717862a2f6e2b (patch)
treefc1539fb060faaf5f4dc57e5034461a28c754427 /java/java.go
parente40383355b3e22de4566df94dc6140e47eb695eb (diff)
parent2070e32eb933ad62066fdf8d3b781fe85f42ac84 (diff)
Merge "Do not override "-g:source,lines" for host java binaries when PRODUCT_MINIMIZE_JAVA_DEBUG_INFO is set."
Diffstat (limited to 'java/java.go')
-rw-r--r--java/java.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/java/java.go b/java/java.go
index ab8f859b6..bd5f6b7d5 100644
--- a/java/java.go
+++ b/java/java.go
@@ -1167,9 +1167,9 @@ func (j *Module) collectBuilderFlags(ctx android.ModuleContext, deps deps) javaB
if flags.javaVersion.usesJavaModules() {
javacFlags = append(javacFlags, j.properties.Openjdk9.Javacflags...)
}
- if ctx.Config().MinimizeJavaDebugInfo() {
- // Override the -g flag passed globally to remove local variable debug info to reduce
- // disk and memory usage.
+ if ctx.Config().MinimizeJavaDebugInfo() && !ctx.Host() {
+ // For non-host binaries, override the -g flag passed globally to remove
+ // local variable debug info to reduce disk and memory usage.
javacFlags = append(javacFlags, "-g:source,lines")
}
javacFlags = append(javacFlags, "-Xlint:-dep-ann")