Minor build tweak: hoist a loop-invariant assignment out of a loop.
Link our plugin with the main LLVM shared library.

Also link with any other libraries that "llvm-config" claims we will
need.

This will make no difference in practice, but I consider it good style
for every shared library to link with the libraries that provide
symbols it uses.  Otherwise, you're depending on someone else to pick
those up for you transitively, which can be fragile in general.
Help Emacs flycheck find the local LLVM installation on CS machines.