OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 | 2 |
3 # Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | 3 # Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. |
4 # | 4 # |
5 # Use of this source code is governed by a BSD-style license | 5 # Use of this source code is governed by a BSD-style license |
6 # that can be found in the LICENSE file in the root of the source | 6 # that can be found in the LICENSE file in the root of the source |
7 # tree. An additional intellectual property rights grant can be found | 7 # tree. An additional intellectual property rights grant can be found |
8 # in the file PATENTS. All contributing project authors may | 8 # in the file PATENTS. All contributing project authors may |
9 # be found in the AUTHORS file in the root of the source tree. | 9 # be found in the AUTHORS file in the root of the source tree. |
10 | 10 |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 # Generate static or dynamic. | 108 # Generate static or dynamic. |
109 if build_type == 'static_only': | 109 if build_type == 'static_only': |
110 gn_target_name = 'rtc_sdk_objc' | 110 gn_target_name = 'rtc_sdk_objc' |
111 elif build_type == 'framework': | 111 elif build_type == 'framework': |
112 gn_target_name = 'rtc_sdk_framework_objc' | 112 gn_target_name = 'rtc_sdk_framework_objc' |
113 gn_args.append('enable_dsyms=true') | 113 gn_args.append('enable_dsyms=true') |
114 gn_args.append('enable_stripping=true') | 114 gn_args.append('enable_stripping=true') |
115 else: | 115 else: |
116 raise ValueError('Build type "%s" is not supported.' % build_type) | 116 raise ValueError('Build type "%s" is not supported.' % build_type) |
117 | 117 |
118 logging.info('Building WebRTC with args: %s', ' '.join(gn_args)) | 118 args_string = ' '.join(gn_args + extra_gn_args) |
| 119 logging.info('Building WebRTC with args: %s', args_string) |
119 | 120 |
120 cmd = ['gn', 'gen', output_dir, | 121 cmd = ['gn', 'gen', output_dir, '--args=' + args_string] |
121 '--args=' + ' '.join(gn_args + extra_gn_args)] | |
122 _RunCommand(cmd) | 122 _RunCommand(cmd) |
123 logging.info('Building target: %s', gn_target_name) | 123 logging.info('Building target: %s', gn_target_name) |
124 | 124 |
125 cmd = ['ninja', '-C', output_dir, gn_target_name] | 125 cmd = ['ninja', '-C', output_dir, gn_target_name] |
126 if use_goma: | 126 if use_goma: |
127 cmd.extend(['-j', '200']) | 127 cmd.extend(['-j', '200']) |
128 _RunCommand(cmd) | 128 _RunCommand(cmd) |
129 | 129 |
130 # Strip debug symbols to reduce size. | 130 # Strip debug symbols to reduce size. |
131 if build_type == 'static_only': | 131 if build_type == 'static_only': |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
216 'Set :CFBundleVersion ' + version_number, infoplist_path] | 216 'Set :CFBundleVersion ' + version_number, infoplist_path] |
217 _RunCommand(cmd) | 217 _RunCommand(cmd) |
218 _RunCommand(['plutil', '-convert', 'binary1', infoplist_path]) | 218 _RunCommand(['plutil', '-convert', 'binary1', infoplist_path]) |
219 | 219 |
220 logging.info('Done.') | 220 logging.info('Done.') |
221 return 0 | 221 return 0 |
222 | 222 |
223 | 223 |
224 if __name__ == '__main__': | 224 if __name__ == '__main__': |
225 sys.exit(main()) | 225 sys.exit(main()) |
OLD | NEW |