I was going to suggest disabling LLVM assertions but then I found chromium.googlesource.com/chromium/src.g and realized they already did it themselves. They simply appear to have left the directory name as Release+Asserts even when assertions are disabled. It's worth double checking anyway.
Conversation
They also already build Clang with PGO, ThinLTO and with hardening features like SSP disabled for performance. It could be built with LTO instead of ThinLTO to get better performance but I doubt it will help substantially. Could also set -march to a more recent CPU revision.
1
1
Replying to
I havenโt gotten far enough in this process to build my own clang... but it will have to be done eventually
1
Replying to
They have a script for doing it so it's pretty easy. I've had to deal with that for both AOSP and Chromium. AOSP build system and tooling are so much nicer to work with than Chromium. AOSP also has a build sandbox and is moving away from having any userspace host dependencies.
1
1
Replying to
You could either run `tools/clang/scripts/build.py --bootstrap --disable-asserts --run-tests --pgo` or use `tools/clang/scripts/package.py` which will do that for you.
Could also try changing both '-DLLVM_ENABLE_LTO=Thin' in build.py to '-DLLVM_ENABLE_LTO=Full'.
1
1
Rather, you need to run `tools/clang/scripts/build.py --bootstrap --disable-asserts --run-tests --pgo --thinlto`. I missed that --thinlto needs to be passed as an argument too because they have that conditionally enabled for Linux builds in the package script.
1
1
Iโll have to give it a go now ๐
GIF
read image description
ALT
1
Replying to
Also try doing the Chromium builds you want to be fast with `symbol_level = 0`, `is_debug = false` and `is_component_build = true` if you aren't doing that already.
Production builds should use `is_debug = false, `is_component_build = false` and `is_official_build = true`.
1
1
Generating the debug symbols probably wastes substantial amount of time and it definitely uses a ridiculous amount of disk space.

