Hey Alex,very very cool!
a few thoughts: ghc stage1 has no GHCI, and thus can't build / use a lib that has template haskell.
LLVM-General uses template haskell pretty heavily to generate the FFI code!
see
example and
for another
so your choices are: figure out how to support TH in stage 1 ghc, OR use llvm-general-pure, and cope with just having llvm pretty printing and parsing. Alternatively, you could treat the "llvm-general" way as being an alternative to the -fasm and -fllvm backends, and have it only be built / supported in the stage2 backend.
point being: start with getting -flllvm working just using llvm-general-pure
then once you've got that working, having an llvm alternative that can ghc can enable in stage2 (when ghci/th is a thing) can be made to work.
either way, very cool! it gives a path towards bundling llvm with ghc, or at least is a decent experiment towards that.
one thing you may want to consider is how to remove the TH deps from llvm general. This would make it possible use it in stage1 GHC, which would make it much more likely to be actually merged into GHC proper.
again, props for getting this experimentation started!
-Carter