emscripten-core / emscripten-core/emscripten

Passing a -g1 or -g2 flag at compile time doesn't do anything

Open
#25,202 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

Passing -g1 to clang at compile time gives a reduced amount of debug information. In emscripten, it gets filtered out and doesn't do anything.

[currently](https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-gline-tables-only) it looks like -g1 is just equivalent to `-gmlt` and `-gline-tables-only` (although I'm pretty sure this wasn't always the case, and I also don't think it's the case in gcc). So there is a workaround for this (also `-gline-tables-only` is what our docs recommend to users for this use case). But users might already have `-g1` in their build files, so we should probably fix this.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.