[cfe-dev] Understanding targets

Gaier, Bjoern via cfe-dev cfe-dev at lists.llvm.org
Wed Nov 13 04:55:59 PST 2019

Heyho everyone,

I have a big noob question again! I basically want to know, how I can find out which processors a certain installation of Clang supports and how do I change the target processor.
Some background to make my question more clear:

Normally I develop applications for Windows and 64bit - back then using the MSVC compiler. By now I changed to the fantastic Clang-Cl and didn't thought much about processors - I take it automatically target x86-64 because of Visual Studio?

However, I know that Clang supports more processors (or architectures? What is the difference?) then x86-64. So I wanted to know, which are supported and how do I tell Clang do use a different target?

To give even more background:
I used an old development environment, which provided compiler for the old Playstation CPU - Wikipedia says it is a "32-bit RISC MIPS R3000A-compatible MIPS R3051" (I simply thought it is a R3000). And I started to wonder, how do I know if Clang supports that old CPU?

So I ran my llvm-config with --targets-built and got:
AArch64 AMDGPU ARM BPF Hexagon Lanai Mips MSP430 NVPTX PowerPC RISCV Sparc SystemZ WebAssembly X86 XCore

I see there "Mips" and "RISCV" but no RISC MIPS or even a R3000 - does that now mean that Clang does not support does old processors? Or does it? What do I do if I encounter a 'wild' Clang without llvm-config - can I still find out its targets? I have no idea and this is why I'm asking.

Thank you in advance for any help!

Kind greetings
Björn Gaier

Als GmbH eingetragen im Handelsregister Bad Homburg v.d.H. HRB 9816, USt.ID-Nr. DE 114 165 789 Geschäftsführer: Dr. Hiroshi Nakamura, Dr. Robert Plank, Markus Bode, Heiko Lampert, Takashi Nagano, Takeshi Fukushima. Junichi Tajika
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20191113/7fd89ed9/attachment.html>

More information about the cfe-dev mailing list