[LLVMdev] Objective-C code in lli

Samuel Crow samuraileumas at yahoo.com
Sun Oct 18 19:27:50 PDT 2009


Hi Eric,

You're forcing the interpreter.  That is less compatible than the JIT since fewer people are interested in maintaining the interpreter.  I'm not sure how well it interprets since there has been some work done on it.  Try leaving that option out.  Also, make sure that Clang has all of the proper entries set for emitting LLVM bitcode rather than object code.

I hope this helps,

--Sam


>
>From: Eric Brunstad <ericbrunstad at mac.com>
>To: llvmdev at cs.uiuc.edu
>Sent: Sun, October 18, 2009 8:32:04 PM
>Subject: [LLVMdev] Objective-C code in lli
>
>Hi,
>
>
>Is it possible to run Objective-C code in lli?  lli does not seem to want to load Foundation.framework.
>
>
>Please see below.
>
>
>Thanks,
>
>
>Eric Brunstad
>
>
>#import <Foundation/Foundation.h>
>
>
>int main(int argc, char *argv[])
>{
>NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
>NSLog(@"test!");
>[pool drain];
>return EXIT_SUCCESS;
>}
>
>
>cmu-351714:llvm-2.5 ericbrunstad$ /Users/ericbrunstad/Downloads/llvm-2.5/Release/bin/lli -force-interpreter=true -stats  /Users/ericbrunstad/Desktop/test/test.o -load=/System/Library/Frameworks/Foundation.framework/Foundation
>
>
>
>Could not resolve external global address: __CFConstantStringClassReference
>0   lli               0x0000000100687556 (anonymous namespace)::SignalHandler(int) + 470
>1   libSystem.B.dylib 0x00007fff83ee10aa _sigtramp + 26
>2   libSystem.B.dylib 0x0000000100a0b4ba _sigtramp + 2092082218
>3   lli               0x00000001001e8374 llvm::ExecutionEngine::emitGlobals() + 6164
>4   lli               0x00000001001dbd69 llvm::Interpreter::Interpreter(llvm::ModuleProvider*) + 185
>5   lli               0x00000001001dbdd8 llvm::Interpreter::create(llvm::ModuleProvider*, std::string*, bool) + 56
>6   lli               0x0000000100010803 main + 243
>7   lli               0x00000001000106e8 start + 52
>
>


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20091018/1c59a4a1/attachment.html>


More information about the llvm-dev mailing list