MEGA65 / mega65-libc

Simple C library for the MEGA65
Other
25 stars 20 forks source link

Add support for llvm-mos #14

Closed mlund closed 2 years ago

mlund commented 2 years ago

This adds support for the llvm-mos compiler. Most functions from the cc65 directory are included. It is interesting to enable pedantic compiler warnings which will emit quite a few issues that I will not address here as they should likely be fixed across all targets.

Unfortunately, the llvm-mos is currently unable to assemble the .s files due to incomplete 65c02 opcodes. We will have to wait until these become available (hopefully soon, https://github.com/llvm-mos/llvm-mos/pull/192). Update: The 65c02 (still incomplete) support is now merged into llvm-mos.

Best / Mikael aka Wombat

ping @gurcei

gurcei commented 2 years ago

I don't have merge access on this repo, so will have to ping @lydon42 for help on the merge back.

mlund commented 2 years ago

Thanks for reviewing! Yes it's confined to it's own directory. I would like to eventually aggregate the source files for all compilers, but I suspect we would end up with a lot if ifdefs. I did copy in the .clang-format file from the mega65-tools project, but it's not yet applied to any source file outside the llvm/ directory.