[PATCH] D149193: [Driver] Add -dumpdir and change -gsplit-dwarf .dwo names for linking
Scott Linder via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 27 09:07:03 PDT 2023
scott.linder added a comment.
In D149193#4300885 <https://reviews.llvm.org/D149193#4300885>, @MaskRay wrote:
> I think the patch as-is implements all the useful parts of GCC's complex rules and in the absence of `-dumpbase` (we deliberately don't implement), the rule almost exactly matches GCC unless we do `gcc -g -gsplit-dwarf d/a.c -o e/a.out` (instead of other filenames).
>
> https://maskray.me/blog/2023-04-25-compiler-output-files records all my findings.
I agree that the special-casing of `a.out` when explicitly specified is odd.
Another option to avoid any confusion or debates over exact behavior relative to GCC would be to just make our own option. Rather than add `-dumpdir` we could add `-dump-prefix` or something. I'm also OK with just implementing a simpler subset of the GCC options though (i.e. what you have already).
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