[PATCH] D94882: [MC] Upgrade DWARF version to 5 upon .file 0
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 28 00:15:40 PST 2021
jhenderson added a comment.
In D94882#2525883 <https://reviews.llvm.org/D94882#2525883>, @MaskRay wrote:
> The default DWARF version is decided by clang driver. Different toolchains have different defaults. The version option does not require `-g`.
>
> clang -target x86_64-linux -c a.s '-###' # "-dwarf-version=4"
> clang -target x86_64-freebsd12 -c a.s '-###' # "-dwarf-version=2"
>
> If we want a diagnostic, we will need additional information whether `-dwarf-version` is implicitly or explicitly specified. GNU as currently does not have a diagnostic.
> I have put reason why I think the diagnostic is not very useful in my initial summary.
Got it now, thanks. I don't have a strong feeling about whether a new option to enable this diagnostic is a good idea or not. If it existed, I'd expect to be something like --warn-for-mismatching-dwarf-version or something to that effect, and is specified automatically if the user explicitly specifies the DWARF version themselvse. I don't think whether GNU as produces a diagnostic or not is really relevant. I think I'd like someone else with more frontend experience to chime in at this point.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94882/new/
https://reviews.llvm.org/D94882
More information about the llvm-commits
mailing list