[lld/COFF] Add /dwodir to enable DWARF fission with LTO
authorHaohai Wen <haohai.wen@intel.com>
Sat, 1 Jul 2023 00:58:56 +0000 (08:58 +0800)
committerHaohai Wen <haohai.wen@intel.com>
Sat, 1 Jul 2023 00:59:12 +0000 (08:59 +0800)
commit2a631a8fedc21eae9568feb69d405800fa9648e5
treef28225d822ef8d3308d57ebbf8e79832960a20ce
parentb43375bb8195bd451850f42b7b99548aa1ba43fd
[lld/COFF] Add /dwodir to enable DWARF fission with LTO

This patch added /dwodir to lld/COFF which is equivalent to lld/ELF
option -plugin-opt=dwo_dir=. This option tells LTO backend to create
dwo directory and files and all dwo files will be in it. Otherwise all
dwarf sections will be embeded into image even if -gsplit-dwarf is
specified when using LTO.

Reviewed By: MaskRay

Differential Revision: https://reviews.llvm.org/D154070
lld/COFF/Config.h
lld/COFF/Driver.cpp
lld/COFF/LTO.cpp
lld/COFF/Options.td
lld/test/COFF/lto-debug-fission.ll [new file with mode: 0644]