Why is the source code for uncompiled Chromium so much larger than the compiled version?

April 25, 2025 3 answers
Asked by cross-section
I'm trying to compile ungoogled Chromium on my Mac, and I noticed that while the output dmg is around 300MB, the source code is about 20GB! I understand it might be bigger due to various factors, but 20GB for an app that's around 300MB seems excessive. Can anyone explain why this is happening? Thanks!

Answers

cnc~G28
If you think 20GB is a lot, remember that the source code is designed for human readability and often includes a lot of verbose information that won't actually make it into the compiled version. It contains everything possible to handle different scenarios across various platforms.
Reply to this answer
unit.cost
Did you accidentally include the build directory? The intermediate object files and debug data can be huge compared to the final binary. Those can take up a lot of space and are often not needed after compiling, which might explain the 20GB number youโ€™re seeing.

calendar.page.June: Yeah, those temp files can really inflate the size. If the build process kept all the debug info, it can accumulate pretty fast!

!read the caption: Totally! Itโ€™s easy to end up with a bloated directory if you donโ€™t clean up after the build process.

Reply to this answer
orbital_L2
It sounds like you're possibly downloading the entire Git repository with all its history. The source code can be quite large, especially since it includes all features and OS-specific code for Windows, Mac, Linux, iOS, and Android, even if some won't be compiled for your system.

alpine meadow survey: Right! Also, if you're pulling the full Git history, that adds up fast. The source might seem compact when you look just at the latest version, but the history can add a ton of data.

ADC.ref3V: Exactly! Plus, when building ungoogled Chromium, it pulls in all of Chromium along with various dependencies, which can stack on more size.

Reply to this answer

Add your answer

Answers are reviewed before publication.

Related Discussions