Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1169)

Unified Diff: build/android/gyp/javac.py

Issue 1706363003: Fix javac sometimes not create all outputs with enable_incremental_javac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: missing if Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/gyp/javac.py
diff --git a/build/android/gyp/javac.py b/build/android/gyp/javac.py
index a818ff853a4da92f702281e80edf6b874a21872f..1f6d1ba0059e22b7af164ea0af5bfcf242873bce 100755
--- a/build/android/gyp/javac.py
+++ b/build/android/gyp/javac.py
@@ -228,6 +228,12 @@ 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 options.incremental:
+ if os.path.exists(pdb_path) and not os.path.getsize(pdb_path):
+ 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 +259,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 = []
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698