macOS 15 fails line-tables-only because of change in C debuginfo
~~cc @madsmtm If you recognize this off the top of your head: https://github.com/rust-lang/backtrace-rs/actions/runs/17957211691/job/51071470672~~
A regression has been surfaced by a recent change in the runner images from macOS 14 to macOS 15. The effect of the regression is that when we compile some C code using -g1, which typically adds debuginfo, using an automatically-determined C toolchain by the logic in the cc crate, we no longer have frames for the C code in our backtrace.
The root of the regression might be in backtrace-rs, it might be in cc-rs, and it might be in the Xcode toolchain packaged by https://github.com/actions/runner-images. This might be because of an Apple-specific change, or it might be because of a change in upstream Clang. Currently nothing has been eliminated from consideration.
Likely https://github.com/actions/runner-images/issues/12520, try using macos-14?
Unsure why the bug happens, but that should unblock your CI in the meantime.
That's weird.
The trace is failing when it enters C code. It may be a change in available debuginfo for C libraries...?
That doesn't make sense, we build it ourselves and set -g1?
I have updated the issue with the current summary of the situation.
Hmm. Apparently "weird issues we can't pin down but Xcode maybe?" is a recurring problem: https://github.com/rust-lang/backtrace-rs/issues/327
GitHub's runner images package macOS 14 with Xcode 16.2, but macOS 15 is packaged with Xcode 16.4, giving us these two release note sets to scan through:
- https://developer.apple.com/documentation/xcode-release-notes/xcode-16_3-release-notes
- https://developer.apple.com/documentation/xcode-release-notes/xcode-16_4-release-notes
But this contains absolutely no information I can identify as useful, here.
I have identified the cause as a subtle change in how appleclang responds to different sequences of debuginfo (-g) commands. This may be because of upstream clang or it may be particular to appleclang. I need to more closely compare the command lines used by cc-rs.
Might be of relevance: I don't think cc-rs actually passes -g on macOS, it passes -gdwarf-2.
(Which might be wrong, idk.?)