Commit 95ba5b0d authored by Mohamed Heikal's avatar Mohamed Heikal Committed by Commit Bot

Android: Fix compile with enable_incremental_javac=true

Bug affects java targets with no deps.

Change-Id: I3b85d3a1affcdf9996743d9ff6bf304753af992c
Reviewed-on: https://chromium-review.googlesource.com/827726Reviewed-by: default avataragrieve <agrieve@chromium.org>
Commit-Queue: Mohamed Heikal <mheikal@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524201}
parent 3a6f54a3
...@@ -209,8 +209,12 @@ def _OnStaleMd5(changes, options, javac_cmd, java_files, classpath_inputs): ...@@ -209,8 +209,12 @@ def _OnStaleMd5(changes, options, javac_cmd, java_files, classpath_inputs):
# Add the extracted files to the classpath. This is required because # Add the extracted files to the classpath. This is required because
# when compiling only a subset of files, classes that haven't changed # when compiling only a subset of files, classes that haven't changed
# need to be findable. # need to be findable.
classpath_idx = javac_cmd.index('-classpath') try:
javac_cmd[classpath_idx + 1] += ':' + classes_dir classpath_idx = javac_cmd.index('-classpath')
javac_cmd[classpath_idx + 1] += ':' + classes_dir
except ValueError:
# If there is no class path in the command line then add the arg
javac_cmd.extend(["-classpath", classes_dir])
# Can happen when a target goes from having no sources, to having sources. # Can happen when a target goes from having no sources, to having sources.
# It's created by the call to build_utils.Touch() below. # It's created by the call to build_utils.Touch() below.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment