title: Clang removing dead code during static linking (gcc equivalent of -Wl, --gc-sections)
body: <p>I'm linking against a static library and I wonder how one should handle stripping of dead code in llvm/Clang. I can't find any documentation that hints that Clang has some equivalent of -Wl, --gc-section or -dead_strip. </p>
  
  <p>I assume that some dead code elimination is performed automatically at the higher optimisation levels, but that's the case in gcc too, right? Yet, gcc provides some explicit control of this via the above mentioned flags. Does Clang not provide that or am I missing something?</p>
  
  <p>(The system is OSX)</p>