[PATCH] D149193: [Driver] Add -dumpdir and change -gsplit-dwarf .dwo names for linking

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 3 11:24:21 PDT 2023


MaskRay added a comment.

In D149193#4316293 <https://reviews.llvm.org/D149193#4316293>, @dblaikie wrote:

> I guess my main question is: What's the motivation for implementing this? Do you have a need/use for this? (it doesn't seem to be motivated by GCC compatibility - as discussed, looks like we're diverging in a bunch of ways from their behavior and the argument made that these are "developer" flags, so not a stable/compatible interface used across both compilers)

This is a long-known problem that features with auxiliary output files go to strange directories (temporary directory, usually `/tmp`).
Among these options, the prominent ones are `-gsplit-dwarf` and `-ftime-trace` (`clang -ftime-trace a.c b.c` https://github.com/llvm/llvm-project/issues/57285).

By just implementing `-dumpdir `, we don't diverge in "a bunch ways". If GCC has fixed their `-o d/a.out` bug, our behavior should match theirs.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149193/new/

https://reviews.llvm.org/D149193



More information about the cfe-commits mailing list