brave/brave-browser

Mitigate OOM issues in LTO production builds

Opened this issue · 0 comments

We have regular OOM issues on all platforms when building brave:all target.
So far we disabled building them in all platforms except linux which still suffers from this issue. Instead of stopping to build this target, we seek to find a more permanent solution that works on all platforms.

Unfortunately you can't set concurrent_links=1 due to an assert:
https://source.chromium.org/chromium/chromium/src/+/main:build/toolchain/concurrent_links.gni;l=131;drc=a1987a2128d8fcd44bb5b88c0ea9ca491bb7e66a

alternatively we can increase em_per_link_gb here: https://source.chromium.org/chromium/chromium/src/+/main:build/toolchain/concurrent_links.gni;l=41;drc=a1987a2128d8fcd44bb5b88c0ea9ca491bb7e66a

Either of them seem to require patch