OLD | NEW |
---|---|
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # | 2 # |
3 # Copyright 2013 The Chromium Authors. All rights reserved. | 3 # Copyright 2013 The Chromium Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 | 6 |
7 import optparse | 7 import optparse |
8 import os | 8 import os |
9 import shutil | 9 import shutil |
10 import re | 10 import re |
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
344 | 344 |
345 if options.chromium_code: | 345 if options.chromium_code: |
346 javac_cmd.extend(['-Xlint:unchecked', '-Xlint:deprecation']) | 346 javac_cmd.extend(['-Xlint:unchecked', '-Xlint:deprecation']) |
347 else: | 347 else: |
348 # XDignore.symbol.file makes javac compile against rt.jar instead of | 348 # XDignore.symbol.file makes javac compile against rt.jar instead of |
349 # ct.sym. This means that using a java internal package/class will not | 349 # ct.sym. This means that using a java internal package/class will not |
350 # trigger a compile warning or error. | 350 # trigger a compile warning or error. |
351 javac_cmd.extend(['-XDignore.symbol.file']) | 351 javac_cmd.extend(['-XDignore.symbol.file']) |
352 | 352 |
353 classpath_inputs = options.bootclasspath | 353 classpath_inputs = options.bootclasspath |
354 # TODO(agrieve): Remove this .TOC heuristic once GYP is no more. | 354 if options.classpath: |
355 if options.classpath and not options.classpath[0].endswith('.interface.jar'): | 355 if options.classpath[0].endswith('.interface.jar'): |
Yaron
2016/04/18 14:49:41
why do we only care about the first item? is it th
agrieve
2016/04/18 16:45:35
Right. That's what the comment on 358 is meant to
| |
356 for path in options.classpath: | 356 classpath_inputs.extend(options.classpath) |
357 if os.path.exists(path + '.TOC'): | 357 else: |
358 classpath_inputs.append(path + '.TOC') | 358 # TODO(agrieve): Remove this .TOC heuristic once GYP is no more. |
359 else: | 359 for path in options.classpath: |
360 classpath_inputs.append(path) | 360 if os.path.exists(path + '.TOC'): |
361 classpath_inputs.append(path + '.TOC') | |
362 else: | |
363 classpath_inputs.append(path) | |
361 | 364 |
362 # Compute the list of paths that when changed, we need to rebuild. | 365 # Compute the list of paths that when changed, we need to rebuild. |
363 input_paths = classpath_inputs + options.java_srcjars + java_files | 366 input_paths = classpath_inputs + options.java_srcjars + java_files |
364 | 367 |
365 output_paths = [ | 368 output_paths = [ |
366 options.jar_path, | 369 options.jar_path, |
367 options.jar_path.replace('.jar', '.excluded.jar'), | 370 options.jar_path.replace('.jar', '.excluded.jar'), |
368 ] | 371 ] |
369 if options.incremental: | 372 if options.incremental: |
370 output_paths.append(options.jar_path + '.pdb') | 373 output_paths.append(options.jar_path + '.pdb') |
(...skipping 10 matching lines...) Expand all Loading... | |
381 options, | 384 options, |
382 input_paths=input_paths, | 385 input_paths=input_paths, |
383 input_strings=javac_cmd, | 386 input_strings=javac_cmd, |
384 output_paths=output_paths, | 387 output_paths=output_paths, |
385 force=force, | 388 force=force, |
386 pass_changes=True) | 389 pass_changes=True) |
387 | 390 |
388 | 391 |
389 if __name__ == '__main__': | 392 if __name__ == '__main__': |
390 sys.exit(main(sys.argv[1:])) | 393 sys.exit(main(sys.argv[1:])) |
OLD | NEW |