I have lots of formulas installed via homebrew, but the only one that gets me constantly worried about my computer’s health is ffmpeg.
When it starts compiling, my cpu overheats like crazy and reaches temperatures above 100°C. This can’t be good.
How can I make sure this does not happen?
If it is of any help, it’s compiling with clang.

tl;dr: is there any way, either in homebrew or clang to throttle CPU usage?

You might have luck reducing the amount of parallelism during builds. This can be achieved by setting the HOMEBREW_MAKE_JOBS environment variable to a smaller number, like HOMEBREW_MAKE_JOBS=1 brew install ffmpeg or similar. See the manpage for more detail.

HOMEBREW_MAKE_JOBS=1 seems to have done the trick. It’s taking longer, but at least it’s staying at less insane temperatures.
I added export HOMEBREW_MAKE_JOBS=1 to my .bash_profile, hopefully that will solve any other overheating problems in the future.