[PATCH] D46628: [ELF] Add --strip-debug-non-line option
Lucian Adrian Grijincu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 25 12:47:58 PDT 2019
luciang marked 5 inline comments as done.
luciang added a comment.
Some clarifications: our third-party management system stores a single version of `.o` and doesn't allow you to choose between flavors like `a.full.o` + `a.line.o`.
Other companies' third-party code is always built from source -- applying whatever compiler options the author needs at that point (`-g1` or `-g2` as needed), but ours doesn't :(
If I change our TP to use `-g1` we lose debug info for TP code.
In many contexts we need rich debug info (e.g. when debugging something or shipping to production),
In other contexts (e.g. in a continuous integration system) we build binaries with minimal debug info (stacktraces + file:line info are sufficient).
- code built from source uses `-g1`
- but not all code is built from source: a significant amount comes from this central TP store where `.o`s are built with `-g2` and can't be easily adapted to use `-g1`.
----
> compile once + link twice
> clang a.o -o a.full
> clang a.o -Wl,--strip-debug-non-line -o a.line # will be changed
> I wonder if you can change the second link to reduce-tool a.full -o a.line.
We don't do that.
- In the CI system we don't create both `a.full` and `a.line` binaries: we only create `a.line`
- when creating release binaries or binaries for local debugging we create `a.full`
----
> compile twice + link twice
> clang -g -c a.c -o a.full.o
> clang -g1 -c a.c -o a.line.o
As I mentioned above the TP system doesn't support `a.full.o` + `a.line.o` flavors, just `a.o`.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D46628/new/
https://reviews.llvm.org/D46628
More information about the llvm-commits
mailing list