Compiling 1.3.1 fails with undefined LLVM error

It would be great if you could provide steps that reproduce this from scratch (eg a script, starting with checking out the relevant branch).