How to build chromium code changes

380 views
Skip to first unread message

Viswa Prakash

unread,
Apr 8, 2019, 3:20:26 AM4/8/19
to Chromium-dev
Hi Everyone,

I have successfully built chromium source by following the instruction from this link. Now I want to work with chromium open source project. I want to made code changes and build it, test it. But I am unable to build the source after the changes. If I build the changes using the link, it starts from the beginning. It takes 16 hours to complete the build. 

If I specify the module to build the source, it takes 12 hours to complete the build. But I have frequent code changes, so it is very hard for me to add/remove the code changes. 

Is there any other way to build the code changes with chromium in a very less time? Please help me to do this, it will save many hours/days for me. 

If I made a code changes mistakenly, which makes more delay for building the source. 

Thanks,
Prakash V

PhistucK

unread,
Apr 8, 2019, 3:33:32 AM4/8/19
to prakashvis...@gmail.com, Chromium-dev
Did you go over the Faster builds section? 
is_component_build = true in combination with a Jumbo build should make the re-builds significantly faster.
Also, disabling the anti-virus for the Chromium source and output folders would speed it up.
If all of those do not help, maybe you have some software that changes the modified date of your files, causing the compiler to compile everything instead of only the modules that were modified.

Also, it has a Why is my build slow? section.

PhistucK


--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-dev...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/bc83ae8a-4125-4283-9ead-7d9a521e4892%40chromium.org.

cyberfox

unread,
Aug 6, 2024, 8:14:15 PM8/6/24
to Chromium-dev, PhistucK, Chromium-dev, prakashvis...@gmail.com
Hi,

Is there any good solution for recompiling only modified codes now? I also only need to change a few codes in Blink, and I do not want to recompile the whole project which cost me almost an entire day.

Dirk Pranke

unread,
Aug 6, 2024, 9:51:22 PM8/6/24
to hitfzyan...@gmail.com, Chromium-dev, PhistucK, prakashvis...@gmail.com
As long as you don't change what you have checked out (i.e., you don't update your checkout), ninja should only rebuild the files that are affected by your changes, and should not rebuild everything.

However, there's not really a way to only recompile a few files and not all of the affected files; it would be too easy to leave your build in an uncertain state in that situation, so we don't really make it easy (you could theoretically recompile things by hand but I wouldn't encourage it).

Hope that helps,

-- Dirk

uazo

unread,
Aug 7, 2024, 7:35:54 AM8/7/24
to Chromium-dev, Dirk Pranke, Chromium-dev, PhistucK, prakashvis...@gmail.com, hitfzyan...@gmail.com
If it is helpful, we solved a similar problem with https://github.com/bromite/mtool (of which I am not the author): our case is patch regeneration after squash/rebase and subsequent rebuild.
basically backs up the ninja hashes and timestamps and allows subsequent reapplication, the effect is that only the necessary files are rebuild.

it is simple to use and works perfectly (for our use case :):

~/mtool/chromium/mtime.sh --backup
~/mtool/chromium/mtime.sh --restore

I do not know if it is actually what you need, but the code is open and you could adapt it to your needs.
I do not know whether it works if you use siso in local mode.

cyberfox

unread,
Aug 9, 2024, 12:17:36 PM8/9/24
to Chromium-dev, uazo, Dirk Pranke, Chromium-dev, PhistucK, prakashvis...@gmail.com, hitfzyan...@gmail.com
Ok. Thanks. 
I do not change branch or update checkout currently, and I just realized that ninja can recompile the modified cc files only and skip other unmodified files. 

Also, thanks for the mtool you provided. In case I update checkout or change branch later, I may use it. 

Reply all
Reply to author
Forward
0 new messages