4

I’m trying to use the LLVM-based zig cc to compile C code (and eventually other LLVM-based languages like Rust/Zig) for the R4300i / VR4300 MIPS CPU, which is the processor in the N64. But I don't see any evidence or examples of compiling for VR4300 as a target:

  • the compilation guides / tools I’ve seen instruct using GCC / IDO for compilation, making no mention of LLVM-based C compilers (not even the more mainstream ones like clang).
  • I don't see it listed in zig targets.
  • I don't see any way to list the valid targets available for LLVM.

Does LLVM not support the VR4300 as a compilation target? How would I find this out on my own?

TylerH
  • 20,799
  • 66
  • 75
  • 101
CrepeGoat
  • 2,315
  • 20
  • 24
  • I'd guess that GCC *was* used because it was one of the first with support, but clang and LLVM are not to be underestimated and have been catching up fast in areas where they were behind. – tadman Aug 14 '23 at 14:29
  • @tadman possibly. but the VR4300 is quite old at this point, and I imagine it isn't used heavily in industry. so if LLVM never supported it historically, I don't think there would be any pressure these days to add support at this point. ¯\\_(ツ)_/¯ still hoping! – CrepeGoat Aug 14 '23 at 17:25
  • You'll have to search around and see what's up. Someone may well have done it as a "fun" hobby project. – tadman Aug 14 '23 at 17:46
  • 1
    @tadman I did "search around", but I didn't find anything conclusive (nothing said "it is supported", nothing said "it is NOT supported"). Hence why I'm asking here; any help would be appreciated! – CrepeGoat Aug 14 '23 at 19:12
  • 3
    Fair, but it's off-topic here. – tadman Aug 14 '23 at 19:37
  • 2
    @tadman How is this off-topic? please explain. – CrepeGoat Aug 14 '23 at 20:08
  • 2
    `zig targets` shows mips3 support, and the VR4300 was MIPS III – ad absurdum Aug 22 '23 at 06:13
  • For listing valid LLVM targets, see [this answer](https://stackoverflow.com/questions/15036909/how-to-list-supported-target-architectures-in-clang) – irowe Aug 24 '23 at 12:52
  • 1
    I have removed the off-topic request here. Please note that requesting recommendations for tools, libraries, tutorials, or other off-site resources is not allowed on Stack Overflow. Likewise, asking multiple questions in a single post is not allowed. – TylerH Aug 28 '23 at 18:28

0 Answers0