Consider making build directories of the buildbots available

Hi LLVM devs,

As you are already aware, performing a clean build of LLVM requires considerable computing resources. This presents a barrier to entry for people who do not have access to large computers. Since the buildbots already regularly compile the LLVM codebase, making tarballs of their build directories available on a public facing server will dramatically reduce the barrier to entry. Is this something that the community is willing to consider?


Nabeel Omer

Perhaps these pages may help.

Neil Nelson

Ah, apologies, I think I wasn’t clear. I am talking about making object files available in this manner so that people can download them and compile just their changes without having to compile all of LLVM, thus reducing the barrier to entry. As far as I am aware, the releases on Github do not contain object files.

Nabeel Omer

That’s an interesting idea. There are several issues to consider:

One bit of warning, build trees tend to have relative paths baked in. From experience, trying to copy an llvm build tree from one location to another tends to not work well.

The best workaround I’ve seen for this type of thing is to use docker (or your container format of choice) to construct a “build image” with the full source and build trees, then update the source and trigger an (incremental) build.

After that’s out of the way, you run into two major problems quickly.

  1. Such build images tend to be gigantic. (50+gb) Bandwidth costs, storage costs, and download times add up quickly.
  2. Their value as incremental build sources tend to age very quickly. If you look at the commits to llvm, core headers get changed shocking often. As such, if you’re trying to follow ToT you quickly end up doing what is effectively a clean build anyways. The only workflow which “somewhat works” is to develop against some recent snapshot, then rebase only at the very last and pay the cost of a full build.

I’ve played enough with ideas like this in the past to recommend you not go down this path.

An alternate approach I recommend - and use personally - is to do all builds on an AWS instance. With some basic scripting (here’s mine), you can do fast builds for a couple of dollars a day. I’ve been working this was for about 6 months, and have found it dramatically easier than all the options I played with before.



A few points:

  • This doesn’t need to be an official LLVM distribution, it can just be a thing that is exists in good faith that you can download if you want but comes with no guarantees of any kind. A colleague who I was speaking to partially likened it to how people use Homebrew and install packages compiled by “someone”. Package managers do implement additional hash checks, etc. but are not very different from what I am suggesting.
  • We can leave it up to the user to make sure that they have the same version of Clang, Cmake, etc. as the buildbot that compiled the code (the buildbots can store this information in a text file and give it to the users). Like I said this would be a thing that exists with no guarantees of any kind. My idea is to just give people the resources that they need in order to contribute to LLVM and cannot get without spending money.
  • While I do have access to SN-DBS, I’m not talking about myself personally here. People cannot be expected to have access to distributed build systems. Most university students for example will have thin and light ultrabooks that are easy to carry to lectures and most definitely won’t be able to compile LLVM from scratch.



I run the release tests in an Ubuntu VM that I prepare by building and installing the most recent clang-llvm version. I also install a fair number of Ubuntu distribution packages that seemed to be required for building all of the LLVM distribution from when I was looking at that over a year back. The used portion of the VM after the clang-llvm build, those two projects only, that contains the object files is close to 23GB.

Seems like an easy way to put this together would be to tar the VM and provide it for download. 23GB is certainly large but some popular video games obtained by download are larger.

Decide what you want and I can build the VM with the clang projects and upload that.

Neil Nelson