[LLVMdev] unable to interface with target machine
Duncan Sands
baldrick at free.fr
Wed Nov 14 21:33:51 PST 2012
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).
Ciao, Duncan.
More information about the llvm-dev
mailing list