On 15/11/12 05:33, Duncan Sands wrote:> Hi Philip,
>
> ...
>> > I've got a test program in my v3c-storyboard project
>> > http://sourceforge.net/projects/v3c-storyboard/
>> > that generates LLVM assembly for a hello world program.
>> >
>> > If I try
>> >
>> > clang -o hello-world hello-world.ll
>> >
>> > I get "error: unable to interface with target machine".
> ...
>> ; ModuleID = 'my cool jit'
>>
>> @0 = private unnamed_addr constant [14 x i8] c"Hello,
world!\00"
>>
>> declare i32 @puts(i8*)
>>
>> define i32 @main(i32, [0 x i8*]) {
>> entry:
>> %2 = call i32 @puts(i8* getelementptr inbounds ([14 x i8]* @0, i32
>> 0, i32 0))
>> ret i32 0
>> }
>
> maybe try putting a target triple in the IR? Perhaps clang needs to
> know which
> machine you want to target (while llc guesses).
Is there a way to get the target triple of the machine the code is
running on, or barring that, the machine llvm was built
on?>
> Ciao, Duncan.
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Regards,
Philip