title: Is it possible to target the iPhone with compatible LLVM IR/bitcode from a non-Apple operating system?
body: <p>OK, putting aside the obvious packaging and signing issues, would it be possible to compile IOS/iPhone compatible executables, by using correctly constructed LLVM bitcode (IR) from a non-Apple operating system, such as Linux or Windows, i.e. by utilising some combination of Open Source compiler infrastructure such as LLVM, Clang or GCC?</p>
  
  <p>Basically, what I'm contemplating is </p>
  
  <ol>
  <li><p>Compile a pre-existing cross-platform SDK (IOS-compatible) to LLVM Intermediate Representation (IR/bitcode).</p></li>
  <li><p>Analyse and identify the IOS-specific LLVM (IR) function calls within this layer, using LLVM analysis tools.</p></li>
  <li><p>After the compilation of the SDK to LLVM IR on the non-Apple system, <em>replace</em> the Apple/IOS-generated-LLVM-bitcode-SDK-representation within the corresponding LLVM IR function calls generated by the non-Mac host.</p></li>
  <li><p>[possibly] employ the build flags emitted by the Mac's XCode/Clang/LLVM infrastructure, in order to build the IOS-compatible executable on the non-Apple host compilation machine (e.g. Linux or Windows).</p></li>
  </ol>
  
  <p>If this is at all feasible, I would later investigate the creation of an iPhone/IOS bundle (the construction of IPA is documented, ask Google) and use the open-source Apple code-signing routines, already in use within other cross-platform IOS SDK's</p>