I have a static library (C++) (say, libmylib_DARWIN.a
and libmylib_LINUX.a
for 2 architectures) compiled on my Mac using clang (Apple LLVM version 9.0.0 (clang-900.0.39.2)
if is of any relevance).
Right now, there are two problems:
- The static library (using a current build configuration) contains debug symbols
It also shows names of the object files that were used for the archive
otool -Iv libmylib_DARWIN.a
Archive : libmylib_DARWIN.a libmylib_DARWIN.a(firstobjectfile.cpp.o) libmylib_DARWIN.a(secondobjectfile.cpp.o) ....
I would like to remove both the debug symbols and archived filenames from this library. I wonder if there is a convenient way to do it without changing my build configuration.
- will
strip
on Mac do it for both DARWIN- and LINUX-built libraries? Anything I should pay attention too? strip
doesn't seem to remove the archive filenames
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.