savi-lang / savi

A fast language for programmers who are passionate about their craft.
BSD 3-Clause "New" or "Revised" License
154 stars 12 forks source link

Refactor to strip debug symbols without using a shell command. #402

Closed jemc closed 1 year ago

jemc commented 1 year ago

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.