[LLVMdev] Segmentation fault - Kaleidoscope

Chris Lattner clattner at apple.com
Wed Jun 17 13:00:54 PDT 2009

On Jun 17, 2009, at 12:23 PM, Albert Graef wrote:

> Chris Lattner wrote:
>> For JIT applications, please include llvm/Target/TargetSelect.h and
>> call the llvm::InitializeNativeTarget() function before creating an  
>> EE.
> Couldn't the EE creation functions do this call automatically if no
> target has been set yet, instead of just returning a null pointer? For
> the sake of backward compatibility.

No, the whole point of this is to make it trivial for a JIT to link in  
just the code generator it needs.  If the EE depended on all the  
targets, then all the targets would have to get linked in.  This would  
be bad for code size reasons among other things.


More information about the llvm-dev mailing list