Even though Crystal claims to support DWARF 5
(https://github.com/crystal-lang/crystal/pull/11399), it actually chokes if encountering a DWARF 5 attribute, giving broken exception backtraces with a message like this:
Unable to load dwarf information: Unknown DW_FORM_strx1 (Exception)
Even though Crystal claims to support DWARF 5 (https://github.com/crystal-lang/crystal/pull/11399), it actually chokes if encountering a DWARF 5 attribute, giving broken exception backtraces with a message like this:
Starting with clang-14, Clang will prefer DWARF 5 by default, which will make Savi un-debuggable when hitting an exception.
Thus, when generating the LLVM ext, we need to ask Clang to use DWARF 4 instead, for Crystal's sake.