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

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

Issue 1407043010: GN(android): Add work-around for "project database corrupted" error (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add print Created 5 years, 1 month 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 f196581113a5dff8bdbf3c3f3143f0dff1e83ba0..e6487cef70423fb139a42b2ed82198e84c306afa 100755
--- a/build/android/gyp/javac.py
+++ b/build/android/gyp/javac.py
@@ -238,11 +238,20 @@ def _OnStaleMd5(changes, options, javac_cmd, java_files, classpath_inputs,
if md5_check.PRINT_EXPLANATIONS:
stdout_filter = None
- build_utils.CheckOutput(
+ attempt_build = lambda: build_utils.CheckOutput(
cmd,
print_stdout=options.chromium_code,
stdout_filter=stdout_filter,
stderr_filter=ColorJavacOutput)
+ try:
+ attempt_build()
+ except build_utils.CalledProcessError as e:
+ # Work-around for a bug in jmake (http://crbug.com/551449).
+ if 'project database corrupted' in e.output:
+ print ('Applying work-around for jmake project database corrupted '
+ '(http://crbug.com/551449).')
+ os.unlink(pdb_path)
+ attempt_build()
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