Instead of shelling out to the strip tool, we can just use the existing LLVM mechanism for stripping it from the LLVM IR for the module, before emitting to a binary.
This avoids a dependency on the strip tool being available in the environment that we're compiling in, and also avoids issues with cross-compilation causing strip to try to be used on binary files whose arch it does not understand.
Instead of shelling out to the
strip
tool, we can just use the existing LLVM mechanism for stripping it from the LLVM IR for the module, before emitting to a binary.This avoids a dependency on the
strip
tool being available in the environment that we're compiling in, and also avoids issues with cross-compilation causingstrip
to try to be used on binary files whose arch it does not understand.