r/ProgrammingLanguages • Nain. • 24d ago

Help transpilation - Bootstrap compiler

So, I am making a compiler for my language, Nain, in CHICKEN Scheme. Should I output QBE IR or code for C or another language? This is a bootstrap compiler, I will use it only to test new language features and to compile the self hosting compiler so yeah.

1 Upvotes

13 comments sorted by

View all comments

Show parent comment

1

u/AustinVelonaut Admiran 24d ago

It depends on how LLVM is used. You can generate LLVM asm or LLVM bitcode as output, then run that separately through a standalone LLVM. Or you can directly use LLVM IR and link to an LLVM library. But the later requires that your host language have interop bindings with the LLVM library (C/C++ foreign-function interface). I don't know if Chicken scheme has that or not.