| 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 if os.path.exists(path + '.TOC'): | 80 if os.path.exists(path + '.TOC'): |
| 81 jar_inputs.append(path + '.TOC') | 81 jar_inputs.append(path + '.TOC') |
| 82 else: | 82 else: |
| 83 jar_inputs.append(path) | 83 jar_inputs.append(path) |
| 84 | 84 |
| 85 javac_args = [ | 85 javac_args = [ |
| 86 '-g', | 86 '-g', |
| 87 # Chromium only allows UTF8 source files. Being explicit avoids | 87 # Chromium only allows UTF8 source files. Being explicit avoids |
| 88 # javac pulling a default encoding from the user's environment. | 88 # javac pulling a default encoding from the user's environment. |
| 89 '-encoding', 'UTF-8', | 89 '-encoding', 'UTF-8', |
| 90 '-source', '1.7', | |
| 91 '-target', '1.7', | |
| 92 '-classpath', ':'.join(classpath), | 90 '-classpath', ':'.join(classpath), |
| 93 '-d', classes_dir] | 91 '-d', classes_dir] |
| 94 | 92 |
| 95 if bootclasspath: | 93 if bootclasspath: |
| 96 javac_args.extend(['-bootclasspath', ':'.join(bootclasspath)]) | 94 javac_args.extend([ |
| 95 '-bootclasspath', ':'.join(bootclasspath), |
| 96 '-source', '1.7', |
| 97 '-target', '1.7', |
| 98 ]) |
| 97 | 99 |
| 98 if chromium_code: | 100 if chromium_code: |
| 99 # TODO(aurimas): re-enable '-Xlint:deprecation' checks once they are fixed. | 101 # TODO(aurimas): re-enable '-Xlint:deprecation' checks once they are fixed. |
| 100 javac_args.extend(['-Xlint:unchecked']) | 102 javac_args.extend(['-Xlint:unchecked']) |
| 101 else: | 103 else: |
| 102 # XDignore.symbol.file makes javac compile against rt.jar instead of | 104 # XDignore.symbol.file makes javac compile against rt.jar instead of |
| 103 # ct.sym. This means that using a java internal package/class will not | 105 # ct.sym. This means that using a java internal package/class will not |
| 104 # trigger a compile warning or error. | 106 # trigger a compile warning or error. |
| 105 javac_args.extend(['-XDignore.symbol.file']) | 107 javac_args.extend(['-XDignore.symbol.file']) |
| 106 | 108 |
| (...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 310 input_files + build_utils.GetPythonDependencies()) | 312 input_files + build_utils.GetPythonDependencies()) |
| 311 | 313 |
| 312 if options.stamp: | 314 if options.stamp: |
| 313 build_utils.Touch(options.stamp) | 315 build_utils.Touch(options.stamp) |
| 314 | 316 |
| 315 | 317 |
| 316 if __name__ == '__main__': | 318 if __name__ == '__main__': |
| 317 sys.exit(main(sys.argv[1:])) | 319 sys.exit(main(sys.argv[1:])) |
| 318 | 320 |
| 319 | 321 |
| OLD | NEW |