Index: build/android/gyp/javac.py |
diff --git a/build/android/gyp/javac.py b/build/android/gyp/javac.py |
index a818ff853a4da92f702281e80edf6b874a21872f..02ee57606eca01d5c5ab441f2e7d47bf0bf357b6 100755 |
--- a/build/android/gyp/javac.py |
+++ b/build/android/gyp/javac.py |
@@ -228,6 +228,11 @@ def _OnStaleMd5(changes, options, javac_cmd, java_files, classpath_inputs, |
classpath_idx = javac_cmd.index('-classpath') |
javac_cmd[classpath_idx + 1] += ':' + classes_dir |
+ # Can happen when a target goes from having no sources, to having sources. |
+ # It's created by the call to build_utils.Touch() below. |
+ if os.path.exists(pdb_path) and not os.path.getsize(pdb_path): |
nyquist
2016/02/19 20:57:12
Nit: Should you add if options.incremental here? O
agrieve
2016/02/23 02:55:21
The bots agree with you! Done.
|
+ os.unlink(pdb_path) |
+ |
# Don't include the output directory in the initial set of args since it |
# being in a temp dir makes it unstable (breaks md5 stamping). |
cmd = javac_cmd + ['-d', classes_dir] + java_files |
@@ -253,6 +258,9 @@ def _OnStaleMd5(changes, options, javac_cmd, java_files, classpath_inputs, |
'(http://crbug.com/551449).') |
os.unlink(pdb_path) |
attempt_build() |
+ elif options.incremental: |
+ # Make sure output exists. |
+ build_utils.Touch(pdb_path) |
if options.main_class or options.manifest_entry: |
entries = [] |