[PATCH] D77346: [docs] Corrected inaccuracies in Common Problems section
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 6 14:10:45 PDT 2020
aprantl 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.
----------------
Meinersbur wrote:
> 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.
Split DWARF is a DWARF+ELF thing, but not tied to an OS. It's specifically not needed/useful/available for Mach-O (Darwin) because debug info isn't processed by Mach-O linkers at all (instead there is dsymutil).
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