| 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 fnmatch | 7 import fnmatch |
| 8 import optparse | 8 import optparse |
| 9 import os | 9 import os |
| 10 import shutil | 10 import shutil |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 | 55 |
| 56 def DoJavac( | 56 def DoJavac( |
| 57 classpath, classes_dir, chromium_code, java_files): | 57 classpath, classes_dir, chromium_code, java_files): |
| 58 """Runs javac. | 58 """Runs javac. |
| 59 | 59 |
| 60 Builds |java_files| with the provided |classpath| and puts the generated | 60 Builds |java_files| with the provided |classpath| and puts the generated |
| 61 .class files into |classes_dir|. If |chromium_code| is true, extra lint | 61 .class files into |classes_dir|. If |chromium_code| is true, extra lint |
| 62 checking will be enabled. | 62 checking will be enabled. |
| 63 """ | 63 """ |
| 64 | 64 |
| 65 # Compiling guava with certain orderings of input files causes a compiler | |
| 66 # crash... Sorted order works, so use that. | |
| 67 # See https://code.google.com/p/guava-libraries/issues/detail?id=950 | |
| 68 # TODO(cjhopman): Remove this when we have update guava or the compiler to a | |
| 69 # version without this problem. | |
| 70 java_files.sort() | |
| 71 | |
| 72 jar_inputs = [] | 65 jar_inputs = [] |
| 73 for path in classpath: | 66 for path in classpath: |
| 74 if os.path.exists(path + '.TOC'): | 67 if os.path.exists(path + '.TOC'): |
| 75 jar_inputs.append(path + '.TOC') | 68 jar_inputs.append(path + '.TOC') |
| 76 else: | 69 else: |
| 77 jar_inputs.append(path) | 70 jar_inputs.append(path) |
| 78 | 71 |
| 79 javac_args = [ | 72 javac_args = [ |
| 80 '-g', | 73 '-g', |
| 81 '-source', '1.5', | 74 '-source', '1.5', |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 input_files + build_utils.GetPythonDependencies()) | 204 input_files + build_utils.GetPythonDependencies()) |
| 212 | 205 |
| 213 if options.stamp: | 206 if options.stamp: |
| 214 build_utils.Touch(options.stamp) | 207 build_utils.Touch(options.stamp) |
| 215 | 208 |
| 216 | 209 |
| 217 if __name__ == '__main__': | 210 if __name__ == '__main__': |
| 218 sys.exit(main(sys.argv[1:])) | 211 sys.exit(main(sys.argv[1:])) |
| 219 | 212 |
| 220 | 213 |
| OLD | NEW |