Very Slow Clang Build Times

Some time ago I decided to take a few of the C++11 features for a spin on Ubuntu 12.04, but the default Clang version for this distro (3.06) wasn’t good enough so I decided to build from source.

I ended up following these instructions to the letter and it was a walk in the park…until I built a tiny little project and a build time that previously took ~30 seconds suddenly took 4 minutes!  Shock and horror!

After much reading, searching and re-reading I finally realised that I didn’t pay any attention to one of the bullet points under step six:

  • This builds both LLVM and Clang for debug mode.

I simply cleaned, reconfigured with the “–enable-optimized” flag set, rebuilt and the universe returned to normal.

Read the manual man…read the manual…

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s