# fix stack traces on macos when passing absolute path to root source file · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/e673d865fb2dfa6588505d572765ea8c5b4470ee)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: e673d865fb2dfa6588505d572765ea8c5b4470ee

Requested commit: e673d865fb2dfa6588505d572765ea8c5b4470ee

Commit: e673d865fb2dfa6588505d572765ea8c5b4470ee

Tree: 67eeb6401b166803cb7d23b6c5cbd5501b60ede5

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
fix stack traces on macos when passing absolute path to root source file

The comment added by this commit is copied here:

For macOS stack traces, we want to avoid having to parse the compilation unit debug
info. As long as each debug info file has a path independent of the compilation unit
directory (DW_AT_comp_dir), then we never have to look at the compilation unit debug
info. If we provide an absolute path to LLVM here for the compilation unit debug info,
LLVM will emit DWARF info that depends on DW_AT_comp_dir. To avoid this, we pass "."
for the compilation unit directory. This forces each debug file to have a directory
rather than be relative to DW_AT_comp_dir. According to DWARF 5, debug files will
no longer reference DW_AT_comp_dir, for the purpose of being able to support the
common practice of stripping all but the line number sections from an executable.

closes #2700

```

## Parents

- [e9530ce97bbbda9724dce3d6755217fd7880955c](https://git.cafe/gitcafe/zig/commit/e9530ce97bbbda9724dce3d6755217fd7880955c?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/e673d865fb2dfa6588505d572765ea8c5b4470ee?format=markdown)
