[lld] [RFC] [LLD] [COFF] Restructure /debug: option handling, allow controlling features separately (PR #74820)
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 12 12:48:33 PST 2023
Martin =?utf-8?q?Storsjö?= <martin at martin.st>,
Martin =?utf-8?q?Storsjö?= <martin at martin.st>,
Martin =?utf-8?q?Storsjö?= <martin at martin.st>,
Martin =?utf-8?q?Storsjö?= <martin at martin.st>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/74820 at github.com>
================
@@ -130,9 +130,9 @@ struct Configuration {
bool forceMultipleRes = false;
bool forceUnresolved = false;
bool debug = false;
- bool debugDwarf = false;
+ bool includeDwarfChunks = false;
----------------
rnk wrote:
While discarding DWARF sections (`.debug_*`) was and is the default for lld-link, it's not the default for mingw, is it? I think the "obvious", non-format-aware thing for the linker to do is to treat `.debug_*` sections as normal sections.
Perhaps it would be more straightforward to invert the sense of the boolean, rename this to `discardDwarfChunks`, default it to false, and have the driver set it to true in non-mingw mode to preserve the existing behavior of lld-link. And then the question becomes, is that even the right behavior anymore? I think this default existed to defend against incorrectly emitted DWARF, but I'm not sure we really need it. I believe MSVC links debug info normally, although it truncates the section names.
Feel free to proceed with incremental patches, this is just an idea. If we can make these changes, then we can remove many of the `includeDwarfChunks` flag updates when parsing `/debug:`.
https://github.com/llvm/llvm-project/pull/74820
More information about the llvm-commits
mailing list