title: Strip/Remove debug symbols and archive names from a static library
body: <p>I have a static library (C++) (say, <code>libmylib_DARWIN.a</code> and <code>libmylib_LINUX.a</code> for 2 architectures) compiled on my Mac using clang (<code>Apple LLVM version 9.0.0 (clang-900.0.39.2)</code> if is of any relevance).</p>
  
  <p>Right now, there are two problems:</p>
  
  <ol>
  <li>The static library (using a current build configuration) contains debug symbols</li>
  <li><p>It also shows names of the object files that were used for the archive</p>
  
  <p><code>otool -Iv libmylib_DARWIN.a</code></p>
  
  <p><code>Archive : libmylib_DARWIN.a
  libmylib_DARWIN.a(firstobjectfile.cpp.o)
  libmylib_DARWIN.a(secondobjectfile.cpp.o)
  ....</code></p></li>
  </ol>
  
  <p>I would like to remove <strong>both</strong> the debug symbols and archived filenames from this library. I wonder if there is a convenient way to do it <strong>without</strong> changing my build configuration.</p>
  
  <ul>
  <li>will <code>strip</code> on Mac do it for both DARWIN- and LINUX-built libraries? Anything I should pay attention too?</li>
  <li><code>strip</code> doesn't seem to remove the archive filenames</li>
  </ul>
  
  <p>There are some similar questions on SO; however, the ones I found deal with either iOS, Objective C, do not talk about multiplatform, and do not mention archive names.</p>