Building with system LLVM

If you are on Debian or Ubuntu, it is now possible to build rustc with system LLVM that passes make check. This is a howto.

You want LLVM 3.6 RC4 or later.

For Debian, you can install the official llvm-3.6-dev package. For Ubuntu, you can install from APT repository. APT repository is maintained by the same people who maintain the official Debian/Ubuntu packages.

Instead of ./configure, run:

$ ./configure --llvm-root=/usr/lib/llvm-3.6

Now if you run make, no LLVM would be downloaded or compiled. System LLVM will be used instead.


Great! I guess compile time is far better?

Is this not risky, given that there’s patches made to the llvm used by official builds?

Currently, there are patchs made to Rust’s fork of LLVM, but all of them are optimizations and none are required. More patches may be made in the future, but I’d prefer for Rust to keep LLVM 3.6 release compatibility for a while.

That’s really nice! Have you been able to rebootstrap rustc with a previously built version so that doesn’t need to be downloaded as well?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.