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

Side by Side Diff: components/cronet/tools/cr_cronet.py

Issue 1934083002: [Cronet] Use gn desc deps to find third_party licenses. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Brett's comments. Created 4 years, 7 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
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright 2014 The Chromium Authors. All rights reserved. 2 # Copyright 2014 The Chromium Authors. All rights reserved.
3 # Use of this source code is governed by a BSD-style license that can be 3 # Use of this source code is governed by a BSD-style license that can be
4 # found in the LICENSE file. 4 # found in the LICENSE file.
5 5
6 """ 6 """
7 cr_cronet.py - cr - like helper tool for cronet developers 7 cr_cronet.py - cr - like helper tool for cronet developers
8 """ 8 """
9 9
10 import argparse 10 import argparse
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 help='use release configuration') 70 help='use release configuration')
71 71
72 options, extra_options_list = parser.parse_known_args() 72 options, extra_options_list = parser.parse_known_args()
73 print options 73 print options
74 print extra_options_list 74 print extra_options_list
75 75
76 is_os = (sys.platform == 'darwin') 76 is_os = (sys.platform == 'darwin')
77 if is_os: 77 if is_os:
78 target_os = 'ios' 78 target_os = 'ios'
79 test_target = 'cronet_test' 79 test_target = 'cronet_test'
80 gn_args = 'target_cpu = "x64" '
80 out_dir_suffix = '-iphonesimulator' 81 out_dir_suffix = '-iphonesimulator'
81 if options.iphoneos: 82 if options.iphoneos:
83 gn_args = 'target_cpu = "arm64" '
82 out_dir_suffix = '-iphoneos' 84 out_dir_suffix = '-iphoneos'
83 else: 85 else:
84 target_os = 'android' 86 target_os = 'android'
85 test_target = 'cronet_test_instrumentation_apk' 87 test_target = 'cronet_test_instrumentation_apk'
88 gn_args = 'use_errorprone_java_compiler=true '
86 out_dir_suffix = '' 89 out_dir_suffix = ''
87 90
88 gyp_defines = 'GYP_DEFINES="OS=' + target_os + ' enable_websockets=0 '+ \ 91 gyp_defines = 'GYP_DEFINES="OS=' + target_os + ' enable_websockets=0 '+ \
89 'disable_file_support=1 disable_ftp_support=1 '+ \ 92 'disable_file_support=1 disable_ftp_support=1 '+ \
90 'enable_errorprone=1 use_platform_icu_alternatives=1 ' + \ 93 'enable_errorprone=1 use_platform_icu_alternatives=1 ' + \
91 'disable_brotli_filter=1"' 94 'disable_brotli_filter=1"'
92 gn_args = 'target_os="' + target_os + '" enable_websockets=false '+ \ 95 gn_args += 'target_os="' + target_os + '" enable_websockets=false '+ \
93 'disable_file_support=true disable_ftp_support=true '+ \ 96 'disable_file_support=true disable_ftp_support=true '+ \
94 'use_errorprone_java_compiler=true use_platform_icu_alternatives=true '+ \ 97 'use_platform_icu_alternatives=true '+ \
95 'disable_brotli_filter=true' 98 'disable_brotli_filter=true'
96 99
97 extra_options = ' '.join(extra_options_list) 100 extra_options = ' '.join(extra_options_list)
98 if options.release: 101 if options.release:
99 out_dir = 'out/Release' + out_dir_suffix 102 out_dir = 'out/Release' + out_dir_suffix
brettw 2016/05/03 22:13:03 We should pick a different directory name to avoid
mef 2016/05/11 15:57:27 Done.
100 release_arg = ' --release' 103 release_arg = ' --release'
101 gn_args += ' is_debug=false ' 104 gn_args += ' is_debug=false '
102 else: 105 else:
103 out_dir = 'out/Debug' + out_dir_suffix 106 out_dir = 'out/Debug' + out_dir_suffix
104 release_arg = '' 107 release_arg = ''
105 108
106 if options.out_dir: 109 if options.out_dir:
107 out_dir = options.out_dir 110 out_dir = options.out_dir
108 111
109 if (options.command=='gyp'): 112 if (options.command=='gyp'):
(...skipping 25 matching lines...) Expand all
135 return test_ios(out_dir, extra_options) 138 return test_ios(out_dir, extra_options)
136 if (options.command=='build-test'): 139 if (options.command=='build-test'):
137 return build(out_dir, test_target) or test_ios(out_dir, extra_options) 140 return build(out_dir, test_target) or test_ios(out_dir, extra_options)
138 141
139 parser.print_help() 142 parser.print_help()
140 return 1 143 return 1
141 144
142 145
143 if __name__ == '__main__': 146 if __name__ == '__main__':
144 sys.exit(main()) 147 sys.exit(main())
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698