[LLVMdev] standalone llvm

Chris Lattner sabre at nondot.org
Wed Apr 12 21:16:56 PDT 2006


On Thu, 13 Apr 2006, Simon Burton wrote:
>> llc.  llc --help lists all the options.  it compiles llvm bytecode
>> files.
>
> It seems this does not yet work on X86. Are there some restrictions I could
> adhere to in order to get something to work ?
>
> Simon.
>
> $ llc -filetype=dynlib -f -o=helloworld.so helloworld.bc
> $ llc -filetype=obj -f -mcpu=i386 -march=x86 -o=helloworld.o helloworld.bc

These two filetypes aren't supported yet.  You have to produce a .s file t 
hen use a system assembler to produce a .o file:

$ llc -f -o helloworld.s helloworld.bc
$ as helloworld.s
$ ls -l helloworld.o

-Chris

> /lib/tls/libc.so.6(__assert_fail+0x10f)[0xb7dc02df]
> llc(llvm::ELFCodeEmitter::getConstantPoolEntryAddress(unsigned int)+0x0)[0x88ef650]
> llc((anonymous namespace)::Emitter::emitGlobalAddressForPtr(llvm::GlobalValue*, int)+0x77)[0x866ac5d]
> llc((anonymous namespace)::Emitter::emitInstruction(llvm::MachineInstr const&)+0xc0b)[0x866c1b1]
> llc((anonymous namespace)::Emitter::emitBasicBlock(llvm::MachineBasicBlock const&)+0xac)[0x866a9f8]
> llc((anonymous namespace)::Emitter::runOnMachineFunction(llvm::MachineFunction&)+0x115)[0x866a859]
> llc(llvm::MachineFunctionPass::runOnFunction(llvm::Function&)+0x29)[0x85f3421]
> llc(llvm::FunctionPassManagerT::runPass(llvm::FunctionPass*, llvm::Function*)+0x1f)[0x89e39b5]
> llc(llvm::PassManagerT<llvm::FTraits>::runPasses(llvm::Function*, std::map<llvm::Pass*, std::vector<llvm::Pass*, std::allocator<llvm::Pass*> >, std::less<llvm::Pass*>, std::allocator<std::pair<llvm::Pass* const, std::vector<llvm::Pass*, std::allocator<llvm::Pass*> > > > >&)+0x13f)[0x89e52b7]
> llc(llvm::PassManagerT<llvm::FTraits>::runOnUnit(llvm::Function*)+0x17f)[0x89e4d11]
> llc(llvm::FunctionPassManagerT::runOnFunction(llvm::Function&)+0x25)[0x89e5583]
> llc(llvm::FunctionPass::runOnModule(llvm::Module&)+0xa7)[0x8989c63]
> llc(llvm::ModulePassManager::runPass(llvm::ModulePass*, llvm::Module*)+0x1f)[0x89e3b95]
> llc(llvm::PassManagerT<llvm::MTraits>::runPasses(llvm::Module*, std::map<llvm::Pass*, std::vector<llvm::Pass*, std::allocator<llvm::Pass*> >, std::less<llvm::Pass*>, std::allocator<std::pair<llvm::Pass* const, std::vector<llvm::Pass*, std::allocator<llvm::Pass*> > > > >&)+0x13f)[0x89e5e1b]
> llc(llvm::PassManagerT<llvm::MTraits>::runOnUnit(llvm::Module*)+0x17f)[0x89e5875]
> llc(llvm::ModulePassManager::runOnModule(llvm::Module&)+0x25)[0x8988cc9]
> llc(llvm::PassManager::run(llvm::Module&)+0x23)[0x898906d]
> llc(main+0xd8c)[0x84f50b0]
> /lib/tls/libc.so.6(__libc_start_main+0xf4)[0xb7db3974]
> llc[0x84f4281]
> Aborted
>
>
>

-Chris

-- 
http://nondot.org/sabre/
http://llvm.org/




More information about the llvm-dev mailing list