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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 javac_args = [ | 73 javac_args = [ |
74 '-g', | 74 '-g', |
75 # Chromium only allows UTF8 source files. Being explicit avoids | 75 # Chromium only allows UTF8 source files. Being explicit avoids |
76 # javac pulling a default encoding from the user's environment. | 76 # javac pulling a default encoding from the user's environment. |
77 '-encoding', 'UTF-8', | 77 '-encoding', 'UTF-8', |
78 '-source', '1.7', | 78 '-source', '1.7', |
79 '-target', '1.7', | 79 '-target', '1.7', |
80 '-classpath', ':'.join(classpath), | 80 '-classpath', ':'.join(classpath), |
81 '-d', classes_dir] | 81 '-d', classes_dir] |
82 if chromium_code: | 82 if chromium_code: |
83 javac_args.extend(['-Xlint:unchecked', '-Xlint:deprecation']) | 83 # TODO(aurimas): re-enable '-Xlint:deprecation' checks once they are fixed. |
| 84 javac_args.extend(['-Xlint:unchecked']) |
84 else: | 85 else: |
85 # XDignore.symbol.file makes javac compile against rt.jar instead of | 86 # XDignore.symbol.file makes javac compile against rt.jar instead of |
86 # ct.sym. This means that using a java internal package/class will not | 87 # ct.sym. This means that using a java internal package/class will not |
87 # trigger a compile warning or error. | 88 # trigger a compile warning or error. |
88 javac_args.extend(['-XDignore.symbol.file']) | 89 javac_args.extend(['-XDignore.symbol.file']) |
89 | 90 |
90 javac_cmd = ['javac'] + javac_args + java_files | 91 javac_cmd = ['javac'] + javac_args + java_files |
91 | 92 |
92 def Compile(): | 93 def Compile(): |
93 build_utils.CheckOutput( | 94 build_utils.CheckOutput( |
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 input_files + build_utils.GetPythonDependencies()) | 272 input_files + build_utils.GetPythonDependencies()) |
272 | 273 |
273 if options.stamp: | 274 if options.stamp: |
274 build_utils.Touch(options.stamp) | 275 build_utils.Touch(options.stamp) |
275 | 276 |
276 | 277 |
277 if __name__ == '__main__': | 278 if __name__ == '__main__': |
278 sys.exit(main(sys.argv[1:])) | 279 sys.exit(main(sys.argv[1:])) |
279 | 280 |
280 | 281 |
OLD | NEW |