I'm using stack. When i pass -keep-llvm-files
to GHC, i get Main.ll, Lib.ll, and Paths_projectname.ll. How would i use these to create an executable using llvm commands such as llvm-link, llc, and llvm-as as opposed to just letting stack do it for me? Also do i need Paths_projectname.ll create an executable for the program expressed in Main.hs and Lib.hs or is it just purely related to calling projectname-exe from stack?
So far I've tried converting Main.ll, Lib.ll, and Paths_projectname.ll to llvm bitcode using llvm-as. Then i linked them with llvm-link. I tried with and without Paths_projectname.bc. Then i converted the output of llvm-link to an object file with llc. But at the end both clang and gcc fail to compile it to an executable.