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

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

Issue 2312963002: Add flag to control whether cronet is build on iOS. (Closed)
Patch Set: Rebase on top of CL fixing compilation with disable_file_support. Created 4 years, 3 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 | « no previous file | ios/BUILD.gn » ('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/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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 help='use release configuration') 72 help='use release configuration')
73 73
74 options, extra_options_list = parser.parse_known_args() 74 options, extra_options_list = parser.parse_known_args()
75 print options 75 print options
76 print extra_options_list 76 print extra_options_list
77 77
78 is_os = (sys.platform == 'darwin') 78 is_os = (sys.platform == 'darwin')
79 if is_os: 79 if is_os:
80 target_os = 'ios' 80 target_os = 'ios'
81 test_target = 'cronet_test' 81 test_target = 'cronet_test'
82 gn_args = 'target_cpu = "x64" ' 82 gn_args = 'is_cronet_build=true is_component_build=false '
83 gn_extra = '--ide=xcode' 83 gn_extra = '--ide=xcode'
84 out_dir_suffix = '-iphonesimulator'
85 if options.iphoneos: 84 if options.iphoneos:
86 gn_args = 'target_cpu = "arm64" ' 85 gn_args += ' target_cpu="arm64" '
87 out_dir_suffix = '-iphoneos' 86 out_dir_suffix = '-iphoneos'
87 else:
88 gn_args += ' target_cpu="x64" '
89 out_dir_suffix = '-iphonesimulator'
88 else: 90 else:
89 target_os = 'android' 91 target_os = 'android'
90 test_target = 'cronet_test_instrumentation_apk' 92 test_target = 'cronet_test_instrumentation_apk'
91 gn_args = 'use_errorprone_java_compiler=true arm_use_neon=false ' 93 gn_args = 'use_errorprone_java_compiler=true arm_use_neon=false '
92 gn_extra = '' 94 gn_extra = ''
93 out_dir_suffix = '' 95 out_dir_suffix = ''
94 96
95 gyp_defines = 'GYP_DEFINES="OS=' + target_os + ' enable_websockets=0 '+ \ 97 gyp_defines = 'GYP_DEFINES="OS=' + target_os + ' enable_websockets=0 '+ \
96 'disable_file_support=1 disable_ftp_support=1 '+ \ 98 'disable_file_support=1 disable_ftp_support=1 '+ \
97 'enable_errorprone=1 use_platform_icu_alternatives=1 ' + \ 99 'enable_errorprone=1 use_platform_icu_alternatives=1 ' + \
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 return test_ios(out_dir, extra_options) 148 return test_ios(out_dir, extra_options)
147 if (options.command=='build-test'): 149 if (options.command=='build-test'):
148 return build(out_dir, test_target) or test_ios(out_dir, extra_options) 150 return build(out_dir, test_target) or test_ios(out_dir, extra_options)
149 151
150 parser.print_help() 152 parser.print_help()
151 return 1 153 return 1
152 154
153 155
154 if __name__ == '__main__': 156 if __name__ == '__main__':
155 sys.exit(main()) 157 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | ios/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698