<div dir="ltr"><div>Thanks Martin, I'm generating the code using LLVM (writing llvm::Triple myself and llvm::TargetRegistry::lookupTarget is working), and that's how my bitcode is generated then using LLC to cross-compile that.  </div><div><br></div><div><span>So using </span>armv7-win32-msvc  is getting me a bit closer, but what CPU, raspberry pi 3 is running a Cortext-A53, but when I specify that in -mcpu argument I get this error:</div><div><br></div><div>> llc.exe test.bc -o test.obj -filetype=obj -O3 -mtriple=armv7-win32-msvc -mcpu=cortex-a53 -relocation-model=pic<br></div><div>> llc.exe failed: LLVM ERROR: CPU: 'cortex-a53' does not support ARM mode execution!</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 15, 2017 at 2:20 PM, Martin Storsjö <span dir="ltr"><<a href="mailto:martin@martin.st" target="_blank">martin@martin.st</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Fri, 15 Sep 2017, Chris Lovett via llvm-dev wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Is there a way to use LLC to cross-compile some code to run on Windows IOT<br>
on Raspberry Pi ?<br>
I was able to convince LLVM to spit out some bitcode for this, but when I<br>
try llc it dumps:<br>
<br>
llc.exe test.bc -o test.obj -filetype=obj -O3 -mtriple=aarch64-win32-msvc<br>
-mcpu=cortex-a53<br>
</blockquote>
<br></span>
Windows 10 IoT on Raspberry Pi (or anywhere else) is just 32 bit arm for now, so you want to try the armv7-win32-msvc target triplet instead.<br>
<br>
(There is some preliminary support for aarch64-win32 targets also; it seems to work for C code for things I've tested so far, but e.g. C++ support is incomplete. And there's no public aarch64 windows version out at all yet, it's supposedly coming late this year though. So far I've been testing it with wine.)<span class="HOEnZb"><font color="#888888"><br>
<br>
// Martin<br>
</font></span></blockquote></div><br></div>