| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright 2017 The Chromium Authors. All rights reserved. | 2 # Copyright 2017 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 """Tool for finding the cause of binary size bloat. | 6 """Tool for finding the cause of binary size bloat. |
| 7 | 7 |
| 8 See //tools/binary_size/README.md for example usage. | 8 See //tools/binary_size/README.md for example usage. |
| 9 | 9 |
| 10 Note: this tool will perform gclient sync/git checkout on your local repo if | 10 Note: this tool will perform gclient sync/git checkout on your local repo if |
| (...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 241 self.max_load_average = (self.max_load_average or | 241 self.max_load_average = (self.max_load_average or |
| 242 str(multiprocessing.cpu_count())) | 242 str(multiprocessing.cpu_count())) |
| 243 if not self.max_jobs: | 243 if not self.max_jobs: |
| 244 self.max_jobs = '10000' if self.use_goma else '500' | 244 self.max_jobs = '10000' if self.use_goma else '500' |
| 245 | 245 |
| 246 if os.path.exists(os.path.join(os.path.dirname(_SRC_ROOT), 'src-internal')): | 246 if os.path.exists(os.path.join(os.path.dirname(_SRC_ROOT), 'src-internal')): |
| 247 self.extra_gn_args_str = ' is_chrome_branded=true' | 247 self.extra_gn_args_str = ' is_chrome_branded=true' |
| 248 else: | 248 else: |
| 249 self.extra_gn_args_str = (' exclude_unwind_tables=true ' | 249 self.extra_gn_args_str = (' exclude_unwind_tables=true ' |
| 250 'ffmpeg_branding="Chrome" proprietary_codecs=true') | 250 'ffmpeg_branding="Chrome" proprietary_codecs=true') |
| 251 if self.IsLinux(): |
| 252 self.extra_gn_args_str += ' allow_posix_link_time_opt=false' |
| 251 self.target = self.target if self.IsAndroid() else 'chrome' | 253 self.target = self.target if self.IsAndroid() else 'chrome' |
| 252 | 254 |
| 253 def _GenGnCmd(self): | 255 def _GenGnCmd(self): |
| 254 gn_args = 'is_official_build=true symbol_level=1' | 256 gn_args = 'is_official_build=true symbol_level=1' |
| 255 gn_args += ' use_goma=%s' % str(self.use_goma).lower() | 257 gn_args += ' use_goma=%s' % str(self.use_goma).lower() |
| 256 gn_args += ' target_os="%s"' % self.target_os | 258 gn_args += ' target_os="%s"' % self.target_os |
| 257 if self.IsAndroid(): | 259 if self.IsAndroid(): |
| 258 gn_args += (' enable_chrome_android_internal=%s' % | 260 gn_args += (' enable_chrome_android_internal=%s' % |
| 259 str(self.enable_chrome_android_internal).lower()) | 261 str(self.enable_chrome_android_internal).lower()) |
| 260 gn_args += self.extra_gn_args_str | 262 gn_args += self.extra_gn_args_str |
| (...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 809 | 811 |
| 810 if i != 0: | 812 if i != 0: |
| 811 diff_mngr.MaybeDiff(i - 1, i) | 813 diff_mngr.MaybeDiff(i - 1, i) |
| 812 | 814 |
| 813 diff_mngr.Summarize() | 815 diff_mngr.Summarize() |
| 814 | 816 |
| 815 | 817 |
| 816 if __name__ == '__main__': | 818 if __name__ == '__main__': |
| 817 sys.exit(main()) | 819 sys.exit(main()) |
| 818 | 820 |
| OLD | NEW |