开发者

Correct llvm target triple for iPhone simulator

开发者 https://www.devze.com 2023-03-09 04:52 出处:网络
I have written a small piece of code to generate an LLVM module containing a few global variables. I am converting the module to LLVM assembly code using the LLVM assembler and then to native binary b

I have written a small piece of code to generate an LLVM module containing a few global variables. I am converting the module to LLVM assembly code using the LLVM assembler and then to native binary before linking it to other libraries to produce the final binary which is an iPhone app. Everything work fine when I build for the device but when I build for the simulator I get the following error when converting from LLVM assembly to machine code:

file.asm:1:Unknown pseudo-op: .syntax
file.asm:1:Rest of line ignored. 1st junk character valued 117 (u).

I am suspecting that the target开发者_JAVA百科 triple is incorrect for the simulator architecture. I am using armv6-apple-darwin9 for device and i386-apple-darwin10 for simulator. Can someone point out the correct target triple for simulator? Any other tip is equally welcome. The simulator is running on a "10.7 Darwin i386" machine (or so uname -a tells me).


Looks like you're feeding the arm assembler code the i386 assembler (".syntax unified" is ARM-only thing). So, yes, you should generate the code for x86. Most probably - for i386-apple-darwin10. Not sure about the simulator though.

0

精彩评论

暂无评论...
验证码 换一张
取 消