# compilation: fix generating coff debug info on \-gnu · gitcafe/zig

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

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

Visibility: public

Requested revision: a1aa55ebe52636f28335fd7ab30321fc52f48775

Requested commit: a1aa55ebe52636f28335fd7ab30321fc52f48775

Commit: a1aa55ebe52636f28335fd7ab30321fc52f48775

Tree: ffcd11295f9865acc27e0b7f1572318885ed0260

Author: kcbanner

Committer: Andrew Kelley

## Message

```
compilation: fix generating coff debug info on -gnu

The issue with just passing `-gcodeview` is that it's not part of
the `OPT_g_Group` in `clang/Driver/Options.td`, so it doesn't trigger
debug info to be generated.

Passing only `-g` is sufficient on MSVC, as there is logic in `Clang.cpp`
which enables codeview if that is the default for the toolchain. Since
the default for -gnu is not codeview, we do pass `-gcodeview` in that case.

```

## Parents

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

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