[lld] [LLD] [COFF] Add /debug: options nodwarf and nosymtab (PR #75180)

Martin Storsjö via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 14 03:08:31 PST 2023


mstorsjo wrote:

> For a non-list option, I think it is very uncommon for a second occurrence of an option to override partial effects done by the first occurrence. Actually, I cannot think of an example off my head.
> 
> ELF linkers have an example of `-z defs`, `-z undefs`, `--allow-shlib-undefined`, `--unresolved-symbols` where `--unresolved-symbols` overrides both `diagRegular/diagShlib` while other options may override one of diagRegular/diagShlib.
> 
> That said, if this `/debug:` is useful, I think it is fine to be a special case...

Yes, it's a bit of an uncommon case. On the other hand, this is mostly internal api, as the main/only user outside of tests, is the lld mingw interface.

I guess we could make the options more orthogonal by not implicitly enable including DWARF, when enabling the regular PDB `/debug` or `/debug:full`. But that's potentially a more user visible change. In any case, it's easy to do that after this change as well, if we want to proceed in such a direction.

https://github.com/llvm/llvm-project/pull/75180


More information about the llvm-commits mailing list