[Android] Make build output a little quieter.
Suppress warnings from jsr305 by only enabling some warnings for chromium_code. Also fixes the fact that components code wasn't setting chromium_code Review URL: https://chromiumcodereview.appspot.com/12702017 git-svn-id: http://src.chromium.org/svn/trunk/src/build@191706 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This commit is contained in:
Родитель
62e46d65b0
Коммит
c69e0c3a8c
|
@ -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.')
|
||||
|
|
|
@ -201,6 +201,7 @@
|
|||
'--classpath=>(input_jars_paths)',
|
||||
'--src-dirs=>(all_src_dirs)',
|
||||
'--javac-includes=<(javac_includes)',
|
||||
'--chromium-code=<(chromium_code)',
|
||||
'--stamp=<(compile_stamp)',
|
||||
|
||||
# TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja.
|
||||
|
|
|
@ -309,6 +309,7 @@
|
|||
'--classpath=>(input_jars_paths) <(android_sdk_jar)',
|
||||
'--src-dirs=>(all_src_dirs)',
|
||||
'--javac-includes=<(javac_includes)',
|
||||
'--chromium-code=<(chromium_code)',
|
||||
'--stamp=<(compile_stamp)',
|
||||
|
||||
# TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja.
|
||||
|
|
Загрузка…
Ссылка в новой задаче