<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body dir="auto">
<div>Thanks Saleem, Nick.</div>
<div><br>
</div>
<div>I will try with the latest code and share the results.</div>
<div><br>
</div>
<div>Though, just curious if I need to really use clang to generate the object file and the current steps won't work? I ask because using .c file was only an illustration. For my project the IR is not generated from .c files or clang.</div>
<div><br>
</div>
<div>Thanks,</div>
<div>Daman</div>
<div><br>
Sent from my phone</div>
<div><br>
On 08-Jun-2014, at 11:00 am, "Saleem Abdulrasool" <<a href="mailto:compnerd@compnerd.org">compnerd@compnerd.org</a>> wrote:<br>
<br>
</div>
<blockquote type="cite">
<div>
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">On Sat, Jun 7, 2014 at 4:49 PM, Nick Lewycky <span dir="ltr">
<<a href="mailto:nicholas@mxc.ca" target="_blank">nicholas@mxc.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Damanjit Singh wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="">Hi guys,<br>
<br>
Would really appreciate any help here.<br>
<br>
Thanks,<br>
Daman<br>
<br>
</div>
From: Damanjit Singh <<a href="mailto:dsingh@adobe.com" target="_blank">dsingh@adobe.com</a> <mailto:<a href="mailto:dsingh@adobe.com" target="_blank">dsingh@adobe.com</a>>>
<div class=""><br>
Date: Friday, 6 June 2014 12:57 pm<br>
</div>
To: "<a href="mailto:llvmdev@cs.uiuc.edu" target="_blank">llvmdev@cs.uiuc.edu</a> <mailto:<a href="mailto:llvmdev@cs.uiuc.edu" target="_blank">llvmdev@cs.uiuc.edu</a>>"<br>
<<a href="mailto:llvmdev@cs.uiuc.edu" target="_blank">llvmdev@cs.uiuc.edu</a> <mailto:<a href="mailto:llvmdev@cs.uiuc.edu" target="_blank">llvmdev@cs.uiuc.edu</a>>>
<div class=""><br>
Subject: Support for Windows Phone 8.1<br>
<br>
Hi LLVMdev,<br>
<br>
Does the latest trunk code support Windows Phone 8.1 target ?<br>
</div>
</blockquote>
<br>
I don't know this, but ...<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="">I was trying out a simple program, but Visual Studio 2013’s linker<br>
failed for me with this error - app.obj : error LNK2008: Fixup target is<br>
not aligned ‘add3'<br>
<br>
This is what I tried -<br>
<br>
</div>
  * Download latest LLVM sources (as on 4th June) and build them on my<br>
    MAC 10.9 machine.<br>
  * Wrote a simple a.c, with add3 function-
<div class=""><br>
<br>
int add3(int i, int j)<br>
{<br>
int k = i+j;<br>
return k;<br>
}<br>
<br>
</div>
  * Create LLVM IR using Xcode 5.1’s clang ( *clang –S -O0 -emit–llvm a.c* )<br>
  * Create obj file – using llc - *. /i686-apple-darwin11-llc<br>
    -filetype=obj -mtriple=thumbv7-windows-msvc -O0 a.s *<br>
</blockquote>
<br>
... in general this doesn't work. The transformation from C to LLVM IR needs to know the target triple. Try "clang --target=thumbv7-windows-msvc a.c -c -o a.obj"? Since clang has a built-in assembler, you should get a valid COFF file out, to the extent that
 clang and llvm support this target.<br>
<br>
If that doesn't work, I may suggest it's unsupported.<br>
</blockquote>
<div><br>
</div>
<div>As Nick mentioned, please generate the object file directly from clang.  You can use armv7-windows or thumbv7-windows (clang will translate armv7-windows to thumbv7-windows implicitly).  I just fixed a bug that should allow you to link the object files
 with link.</div>
<div> </div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Nick<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  * Now on a Windows 8.1 Desktop machine, link this object file into
<div class=""><br>
    sample (new DirectX app, windows phone) Visual Studio 2013 project.<br>
</div>
  * Declare and Call add3 in the sample windows project.<br>
  * I then get a linker error on building the solution.<br>
<br>
*1>app.obj : error LNK2008: Fixup target is not aligned 'add3'*<br>
*1>LINK : fatal error LNK1165: link failed because of fixup errors*<br>
*========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========*
<div class=""><br>
<br>
<br>
Could someone please confirm about the state of support for Windows<br>
Phone 8.1 ? Or am I missing something here?<br>
<br>
Thanks,<br>
Daman<br>
<br>
<br>
</div>
______________________________<u></u>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>        
<a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvmdev</a><br>
</blockquote>
<br>
______________________________<u></u>_________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a>        
<a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/<u></u>mailman/listinfo/llvmdev</a><br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
Saleem Abdulrasool<br>
compnerd (at) compnerd (dot) org </div>
</div>
</div>
</blockquote>
</body>
</html>