<div dir="ltr"><b>bitcode_strip</b> is a utility which is used to manipulate (leave / remove) <br>
bitcode segments in a Mach-O file. It is a part of Apple’s cctools and it is also distributed with Xcode.<br>
The man page of the tool is available here <a href="https://www.manpagez.com/man/1/bitcode_strip/">https://www.manpagez.com/man/1/bitcode_strip/</a>.<br>
The functionality of <b>bitcode_strip</b> naturally maps onto llvm-objcopy’s model and requires only minimal additions to it.<br>
Therefore, similarly to llvm-strip and llvm-install-name-tool <u>we propose adding a new driver to llvm-objcopy (for Mach-O) with the goal to make it a drop-in replacement for cctools’ <b>bitcode_strip</b></u>. Among other benefits this approach enables us to save space in toolchain distributions (no extra binaries added) and reuse some llvm-objcopy’s features.<br><div>We already have llvm-lipo, llvm-install-name-tool, llvm-strip, llvm-libtool-darwin and llvm-bitcode-strip appears to be one of the last missing tools commonly used for Mach-O.</div><div><br></div><div>Any feedback / comments / suggestions would be greatly appreciated.</div><div><br></div><div>Kind regards,</div><div>Alexander Shaposhnikov</div><div><br></div></div>