@emily @cwebber This is literally true. ChromeOS is embedded in the Chromium source code, including desktop and window manager.

TechPost, building chromium 

@dl @emily @cwebber Well, sort of. Components of chromium that are re-used throughout ChromiumOS are de-coupled from the rest of Chrome, iirc. They're taking this to its logical conclusion with LaCrOS which will de-couple Chromium from ChromiumOS.

It's not just chrome stuff, though. It also contains vendored dependencies.

One of Chromium's lowest-level defenses is control flow enforcement, which they implement using CFI (forward-edge control flow integrity) and CET (Backwards-edge, Windows-only). This is where the heaviness of the build process comes in. Your distro's libs probably don't use CFI so they have to use their own vendored libs to fully benefit.

To do an official build (highly recommended for all the hardening and perf optimizations to take effect), you're also encouraged to use their patched Clang toolchain. So your source build would take way longer if you bootstrap those toolchains. A lot of Clang's exploit mitigations (CFI, shadow call stacks, etc) are actually from the Chromium and Android teams' work which often starts in their forked toolchains.

Finally, the whole thing is LTO'd with ThinLTO so they can use Clang's forward-edge control-flow integrity. Which makes link times and memory usage shoot up. Just doing ffmpeg alone (Chromium used a version of ffmpeg with statically-linked encoders/decoders) will max out my laptop's RAM if I do it with 4 threads or more.

They're also investigating "full LTO" to improve CFI coverage, but they're hesitant because could require over 64GB RAM at link-time. LTO is really hard to scale. The Hexavalent downstream project will probably use this first.

So basically: CFI requires LTO and benefits from vendored libs that are also built with CFI. Many of these libs are statically linked for a variety of reasons. All of that together means a big, slow, RAM-heavy build.

LMK if I got anything wrong. Thank you for coming to my TED talk.
Follow

@Seirdy @dl @cwebber @emily And this is what you get for collectively jumping onto literally a remote-code-execution platform known as HTML5.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.