BITCODE_STRIP(1)

NAME
bitcode_strip - remove or leave the bitcode segment in a Mach-O file

SYNOPSIS
bitcode_strip input [ -r | -m | -l ] [ -v ] [ -keep_cs ] -o output

DESCRIPTION
bitcode_strip strips Mach-O files and Universal files containing LLVM bitcode, either by removing the bitcode or by removing the native executable code. If the Mach-O file or architecture in an Universal file does not have a bitcode segment it is left essentially unchanged. By default bitcode_strip will remove the code signature load commands from the output file as the code signature is no longer valid.

OPTIONS

-r  Remove the __LLVM bitcode segment entirely.

-m  Remove the bitcode from the __LLVM segment, leaving behind a marker.

-l  Remove all of the native executable code, leaving the LLVM bitcode behind. In this case, bitcode_strip will take care to preserve the (__TEXT,__info_plist) section while removing the rest of the __TEXT segment.

-v  Print the arguments passed to other tools run by bitcode_strip when processing bitcode files.

-keep_cs
    Preserve the codesign load commands in the output binary, even though the code signature is no longer valid. This can be useful when using codesign(1) -preserve-metadata to resign the binary.

-o output
    specifies the output file as output.

input
    specifies the input Mach-O or Universal file to operate on.

SEE ALSO
codesign(1), otool(1).