<div dir="ltr">Only these targets are built by default in cmake. AVR doesn't appear to be one of them. So that probably means the release binaries don't build it either. You can check what targets have been compiled in by using "llc --version"<div><br></div><div><div><br></div><div># List of all targets to be built by default:</div><div>set(LLVM_ALL_TARGETS</div><div>  AArch64</div><div>  AMDGPU</div><div>  ARM</div><div>  BPF</div><div>  Hexagon</div><div>  Lanai</div><div>  Mips</div><div>  MSP430</div><div>  NVPTX</div><div>  PowerPC</div><div>  Sparc</div><div>  SystemZ</div><div>  X86</div><div>  XCore</div><div>  )</div></div><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature" data-smartmail="gmail_signature">~Craig</div></div>
<br><div class="gmail_quote">On Wed, Sep 20, 2017 at 12:53 PM, Bodo Wenzel via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">As an developer in the world of embedded control I'm playing around with Clang to see its capabilities. And since it is advertised as being usable for ARM and AVR (among a lot of other targets) I tried these.<br>
<br>
Here at home I'm running Linux, but at the job I'm bound to use Windows. So I'm using Clang 5.0.0 installed by the provided Windows x64 installer. The AVR-GCC is the current WinAVR from 2010. (Yes, I'm aware that there are newer versions, but I have to use this one due to company policies.)<br>
<br>
With the ARM target I had no problems; compiling with Clang and linking with GCC produced executables that ran fine in a simulator. I have no real machine at hand in the moment to check further.<br>
<br>
But the AVR target gives me a hard time. Anything I tried leads to the error "unable to create target: 'No available targets are compatible with this triple.'"<br>
<br>
There is a lot to read at the websites of Clang and LLVM, and I did read. But unfortunately I found nothing helpful.<br>
<br>
Finally I tried to follow the source code but to no avail.<br>
<br>
The command line is like<br>
"clang -target avr -mmcu=atmega128 -I<path-to-winavr-includes> source.c"<br>
<br>
These are the targets I tried:<br>
avr<br>
avr-unknown-unknown<br>
avr-elf<br>
avr-gcc<br>
<br>
What command line is supposed to be given for a successful compilation?<br>
______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
</blockquote></div><br></div>