[PATCH] D77346: [docs] Corrected inaccuracies in Common Problems section
Michael Kruse via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 6 09:44:59 PDT 2020
Meinersbur added inline comments.
================
Comment at: llvm/docs/GettingStarted.rst:1156
+ generate the debug information in the form of a DWARF object file (with the
+ extension .dwo). This option is only available on Linux.
----------------
e-leclercq wrote:
> Meinersbur wrote:
> > I am not sure this is Linux-only. It certainly requires DWARF debug information (.i.e no Windows PDB), but It will probably work on BSDs and maybe also using the target `x86_64-w64-mingw32`.
> I read up on this a bit more and it appears that this works on both UNIX and Linux, so I will definitely change that. I am not quite sure about Windows though, as I came across [[ https://www.phoronix.com/scan.php?page=news_item&px=LLVM-LLDB-Debugger-For-Windows | this article ]]. Would changing this to "This option can be used on both UNIX and Linux" be adequate?
Since the implementation is:
```
if (LLVM_USE_SPLIT_DWARF AND
((uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG") OR
(uppercase_CMAKE_BUILD_TYPE STREQUAL "RELWITHDEBINFO")))
# Limit to clang and gcc so far. Add compilers supporting this option.
if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR
CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
add_compile_options(-gsplit-dwarf)
endif()
endif()
```
AFAIK gcc only supports DWARF. Clang supports split-dwarf for ELF targets.
I'd make it a note saying that the option may not be supported on all platforms. On Windows the platform-standard is codeview (`.pdb`) which is always a separate file. I don't know about MacOS.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77346/new/
https://reviews.llvm.org/D77346
More information about the llvm-commits
mailing list