Llvm-dwp utility on windows

Is there any specific reason why we exclude llvm-dwp.exe from the official windows llvm released prebuilt binaries ?

1 Like

Not sure - probably because it’s only useful/applicable to ELF, I think? (but one could use it for cross-compiling situations)

I will say llvm-dwp is pretty immature in some ways. It does support DWARFv5 (& also works with WebAssembly, which is neat) - which is more than upstream gold dwp supports unfortunately (though there are patches floating around to add support). But the problem is that it’s pretty inefficient - in CPU and memory usage (I should know, I wrote it while trying to understand some issues with gold dwp’s memory usage).

So, yeah, my best guess would be it’s not included because it’s not useful for COFF/Windows files, though it’s not an incontrovertible argument. @hansw2000 I guess you might know something about what goes into Windows releases?

I am trying to cross compile for a Hexagon ELF binary.

@hansw2000 , I see the llvm-dwp is distributed in ubuntu releases but not in windows. I tried to understand where in build system we have decided not to build llvm-dwp for windows, but my expertise is close to novice in build system.

The Windows binaries are built to only include tools which are useful as part of a Windows toolchain. In particular, tools which are used for internal LLVM developement – like opt, llc, FileCheck, etc. – are not part of the installer, unlike the prebuilt binaries on other platforms which include everything.

The way it works is that Windows builds are configured with LLVM_INSTALL_TOOLCHAIN_ONLY=ON (see llvm-project/build_llvm_package.bat at llvmorg-13.0.1-rc3 · llvm/llvm-project · GitHub) and that means only tools part of the LLVM_TOOLCHAIN_TOOLS list become part of the package (the list is defined here: llvm-project/AddLLVM.cmake at llvmorg-13.0.1-rc3 · llvm/llvm-project · GitHub).

Having said that, even though llvm-dwp is probably not useful for most Windows developers, it is also not an internal LLVM development tool, and should probably be part of LLVM_TOOLCHAIN_TOOLS. Let me know if you’d like to send a patch to add it to that list, otherwise I can do it.

@sgundapa is trying to build llvm-dwp for use with a cross toolchain that generates Hexagon ELF files.

That would be great, @sgundapa and I would appreciate it.

Sent ⚙ D118042 Add llvm-dwp to LLVM_TOOLCHAIN_TOOLS

That landed in Add llvm-dwp to LLVM_TOOLCHAIN_TOOLS · llvm/llvm-project@bf00f7a · GitHub

So llvm-dwp will be in the Windows installer for 14.0.0, the first release candidate of which should hopefully appear in the next couple of weeks.