Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(248)

Side by Side Diff: build/android/gyp/javac.py

Issue 1233453010: GN: Fix support errorprone and java_binary (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@gn12
Patch Set: Add errorprone target only for OS=android Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « build/android/BUILD.gn ('k') | build/config/android/internal_rules.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « build/android/BUILD.gn ('k') | build/config/android/internal_rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698