by paulvs · 10y ago · 0 comments
EDIT: Clicking through the source I found about a dozen files in total, mostly scripts and make files.
The solution doesn't involve changing the compiler or building everything into the executable. Instead, this is a makefile coordinated pipeline (front-end swiftc, back-end clang) plus a start.s and a system.c file that omit any need for typical standard library components in the first place.
i.e. a "bare metal" compilation
It still uses the Swift compiler but emits LLVM IR and then uses Clang to target to the different environments.
It could be used to write a kernel in Swift.