mozilla/rust — pull request #1656 by crabtw (2012-01-25 06:16:58+00:00)
Title: let clang build llvm & change the order of llvm include path

* When specifying enable-llvm, it still uses gcc to build llvm.
Adding a condition, let clang do that work.
* If system has installed llvm and specifies include paths in the CFLAGS, it may fail to link rustllvm.
In freebsd's case, 3rd-party libs are installed in /usr/local, so we have to add extra paths to find them.
When compiling rustllvm, it looks up /usr/local/include/llvm/Config/Targets.def not bundled llvm.
That causes RustWrapper.o contains nonexistent symbols, so I replace -I with -iquote to ensure that include paths of LLVM_CXXFLAGS comes before CFLAGS.