title: LLVM: Do I have to set a target layout or is it better to set a target triple?
body: <p>I am learning the basics of the LLVM framework. I read about the target layout that describes the datatypes and about the target triple that describes the machine and the OS.
  However I was not able to find information about what is really mandatory to be set and why.
  I found examples where none of these is set or where one or the other is set. Obviously, it is not necessary to set either for a working IR file, yet I am under the impression that the developers want me to set something there, why else would this interface be exposed?</p>
  
  <p>My understanding is, that based on the target triple, LLVM should be able to derive the correct datalayout by itself, but if that is so, why is it possible to set the data layout by hand.</p>
  
  <p>So what is the correct way of doing this? Which way should I chose? Set the target triple or define the complete layout by hand?</p>