mozilla/rust — pull request #2985 by z0w0 (2012-07-22 00:34:20+00:00)
Title: Allow configuring to use llvm-root with 3.0, 3.0svn, 3.1, 3.1svn

This is a few patches that allows using `llvm-root` with SVN and stable releases. This allows people to use a globally installed LLVM, which didn't work before because of the following reasons:

* `llvm-root` didn't accept the straight 3.1 and 3.0 releases. I've changed the configure script to allow 3.0, 3.0svn, 3.1 and 3.1svn. I'm not sure if 3.0 actually even works, but I just assumed it did because of the error message that was already there.
* `RustWrapper.cc` was initializing all targets whereas `rustllvm.def.in` was only linking to X86 (including X86_64) because that's all Rust supports generating machine code for. I've changed `RustWrapper.cc` to only initialize the targets that Rust currently actually supports.

I am not entirely sure of the status of ARM in Rust (I see a few mentions of it in the source code), so I'm not sure whether that should be initialized / linked in as well (it is currently not linked into in `rustllvm.def.in`). Another thing is `rustllvm.def.in` has repeated mentions of the X86 initialization functions, I'm not sure whether that is intentional or not.