如何减少Ubuntu上庞大的铬生成量

如何减少Ubuntu上庞大的铬生成量

本文介绍了如何减少Ubuntu上庞大的铬生成量?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

出于某种目的,我需要在Linux Ubuntu 20.04计算机上从源代码构建Chrome.

For some purpose, I needed to build chromium from source code on a Linux Ubuntu 20.04 machine.

遵循的说明: https://chromium. googlesource.com/chromium/src/+/master/docs/linux/build_instructions.md

我没有使用任何提及的更快构建设置.

I did not use any of the mentioned Faster Build settings.

完成构建后,将生成一个目录out/default,其默认值为.大小28 GBs.

On completing the build processed a directory out/Default was produced with approx. size 28 GBs.

与下载和安装Chrome相比,这是巨大的.

This is huge compared to what we get on downloading and installing chromium.

我应该如何减小构建尺寸?或者,我不需要完整的out/Default文件夹吗?

How should I reduce the build size? Or, do I not require the complete out/Default folder?

非常感谢您提供有关构建较小尺寸铬的问题的帮助.在此先感谢:)

Any help regarding this issue of building a smaller size chromium is very much appreciated.Thanks in advance :)

推荐答案

我发现Faster Build中提到了一些设置,可以帮助解决此问题(将out/文件夹的大小减少到5.2GB):

I have found a few settings mentioned in Faster Build which can help in this issue (bought down the size of out/ folder to 5.2GBs):

  1. src/目录中运行gn args out/<my_build>来设置gn构建参数.
  2. 提到了一些有用的参数这里
  1. Run gn args out/<my_build> in src/ directory to set gn build parameters.
  2. Some useful parameters are mentioned HERE
is_debug = false
is_official_build = true
optimize_for_size = true
symbol_level = 0
enable_nacl = false
enable_iterator_debugging = false
is_component_build = false
blink_symbol_level=0

我认为optimize_for_size = true对于提到的此处.

这篇关于如何减少Ubuntu上庞大的铬生成量?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 21:26