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

Unified Diff: build/android/javac.py

Issue 12702017: [Android] Make build output a little quieter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: added to apk Created 7 years, 9 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 | build/java.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/android/javac.py
diff --git a/build/android/javac.py b/build/android/javac.py
index 9adf5664bdfb917f75c897f1058f9e53815bc8ec..2b19185c1b2e1c852adfe0228e6770fb38752adf 100755
--- a/build/android/javac.py
+++ b/build/android/javac.py
@@ -40,16 +40,22 @@ def DoJavac(options):
build_utils.DeleteDirectory(output_dir)
build_utils.MakeDirectory(output_dir)
- build_utils.CheckCallDie([
+ cmd = [
'javac',
'-g',
- '-Xlint:unchecked',
'-source', '1.5',
'-target', '1.5',
'-classpath', ':'.join(classpath),
- '-d', output_dir] +
- java_files)
+ '-d', output_dir]
+ # Only output Java warnings for chromium code
+ if options.chromium_code:
+ cmd += ['-Xlint:unchecked']
+ else:
+ cmd += [# Suppress "Sun proprietary API" warnings. See: goo.gl/OYxUM
+ '-XDignore.symbol.file']
+
+ build_utils.CheckCallDie(cmd + java_files)
def main(argv):
parser = optparse.OptionParser()
@@ -60,6 +66,9 @@ def main(argv):
parser.add_option('--classpath', help='Classpath for javac.')
parser.add_option('--output-dir', help='Directory for javac output.')
parser.add_option('--stamp', help='Path to touch on success.')
+ parser.add_option('--chromium-code', type='int', help='Whether code being '
+ 'compiled should be built with stricter warnings for '
+ 'chromium code.')
# TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja.
parser.add_option('--ignore', help='Ignored.')
« no previous file with comments | « no previous file | build/java.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698