| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 arm_version = _GetArmVersion(arch) | 122 arm_version = _GetArmVersion(arch) |
| 123 if arm_version: | 123 if arm_version: |
| 124 gn_args['arm_version'] = arm_version | 124 gn_args['arm_version'] = arm_version |
| 125 gn_args_str = '--args=' + ' '.join([ | 125 gn_args_str = '--args=' + ' '.join([ |
| 126 k + '=' + _EncodeForGN(v) for k, v in gn_args.items()]) | 126 k + '=' + _EncodeForGN(v) for k, v in gn_args.items()]) |
| 127 | 127 |
| 128 _RunGN(['gen', output_directory, gn_args_str]) | 128 _RunGN(['gen', output_directory, gn_args_str]) |
| 129 | 129 |
| 130 ninja_args = TARGETS | 130 ninja_args = TARGETS |
| 131 if use_goma: | 131 if use_goma: |
| 132 ninja_args.extend(['-j', '1024']) | 132 ninja_args.extend(['-j', '200']) |
| 133 _RunNinja(output_directory, ninja_args) | 133 _RunNinja(output_directory, ninja_args) |
| 134 | 134 |
| 135 | 135 |
| 136 def CollectCommon(aar_file, tmp_dir, arch): | 136 def CollectCommon(aar_file, tmp_dir, arch): |
| 137 """Collects architecture independent files into the .aar-archive.""" | 137 """Collects architecture independent files into the .aar-archive.""" |
| 138 logging.info('Collecting common files.') | 138 logging.info('Collecting common files.') |
| 139 output_directory = _GetOutputDirectory(tmp_dir, arch) | 139 output_directory = _GetOutputDirectory(tmp_dir, arch) |
| 140 aar_file.write(MANIFEST_FILE, 'AndroidManifest.xml') | 140 aar_file.write(MANIFEST_FILE, 'AndroidManifest.xml') |
| 141 aar_file.write(os.path.join(output_directory, JAR_FILE), 'classes.jar') | 141 aar_file.write(os.path.join(output_directory, JAR_FILE), 'classes.jar') |
| 142 | 142 |
| (...skipping 25 matching lines...) Expand all Loading... |
| 168 # Architecture doesn't matter here, arbitrarily using the first one. | 168 # Architecture doesn't matter here, arbitrarily using the first one. |
| 169 CollectCommon(aar_file, tmp_dir, args.arch[0]) | 169 CollectCommon(aar_file, tmp_dir, args.arch[0]) |
| 170 for arch in args.arch: | 170 for arch in args.arch: |
| 171 Collect(aar_file, tmp_dir, arch) | 171 Collect(aar_file, tmp_dir, arch) |
| 172 | 172 |
| 173 shutil.rmtree(tmp_dir, True) | 173 shutil.rmtree(tmp_dir, True) |
| 174 | 174 |
| 175 | 175 |
| 176 if __name__ == '__main__': | 176 if __name__ == '__main__': |
| 177 sys.exit(main()) | 177 sys.exit(main()) |
| OLD | NEW |