I thought that you could turn LLVM bytecode into machine code directly using one of it's built-in tools, but according to this SO post, you have to actually provide the front and back-ends. LLVM is really just a tool for applying optimizations:
"LLVM can be used as a compiler framework, where you provide the "front end" (parser and lexer) and the "back end" (code that converts LLVM's representation to actual machine code)."
So my question is this: Is there a framework you can use where you just write a bytecode compiler into that framework's bytecode language, which is then compiled by the framework into the appropriate machine code?
If there is, then it would seem like writing a compiler wouldn't be any more involved than writing a bytecode compiler (basically lexer/parser and translation). I've never written a compiler, but it seems like you would need to generate several different kinds of assembly code (based on different architectures) and then assemble it to make it useful, but if there's some intermediate framework that does this back-end part, then it would take a lot of the sweat out of it all. I thought that LLVM did this, but my current understanding based on the above is that it doesn't.
Sorry if this is a dumb question, I'm just curious about the whole thing and I don't know much about it.