Link error with TOOLLINKOPTS=-ldbghelp on MinGW

From: John Criswell <criswell@cs.uiuc.edu>

Will this library be needed for tblgen or for all LLVM programs? And is it a library you wrote for LLVM, or is it a MingW library?

It's is generally needed for all programs or at least programs using Signals.o (from platform/Signals.cpp) and it is platform/MinGW specific.

TOOLLINKOPTS is used by configure to convey additional linker flags needed to use system libraries. These are typically system libraries for which a -L option is not needed or has already been supplied to the configure script.

Ok.

For libraries internal to LLVM, we add the library to the USEDLIBS variable in the program's Makefile.

How we should handle the problem depends upon whether this will be needed for all programs and whether libdbghelp will be part of the LLVM source tree.

Ok. However, the libdgbhelp isn't provided (so far, though you have access to the system interface through header files) on MinGW. But, you have the option to make your own libraries from system dll's on MinGW. For LLVM, libdbghelp is an external system specific library, so I don't think it should be a part of the LLVM source tree.

Henrik

Henrik Bach wrote:

From: John Criswell <criswell@cs.uiuc.edu>

Will this library be needed for tblgen or for all LLVM programs? And is it a library you wrote for LLVM, or is it a MingW library?

It's is generally needed for all programs or at least programs using Signals.o (from platform/Signals.cpp) and it is platform/MinGW specific.

Okay.

TOOLLINKOPTS is used by configure to convey additional linker flags needed to use system libraries. These are typically system libraries for which a -L option is not needed or has already been supplied to the configure script.

Ok.

For libraries internal to LLVM, we add the library to the USEDLIBS variable in the program's Makefile.

How we should handle the problem depends upon whether this will be needed for all programs and whether libdbghelp will be part of the LLVM source tree.

Ok. However, the libdgbhelp isn't provided (so far, though you have access to the system interface through header files) on MinGW. But, you have the option to make your own libraries from system dll's on MinGW. For LLVM, libdbghelp is an external system specific library, so I don't think it should be a part of the LLVM source tree.

So, if I'm understanding you correctly, libdgbhelp is a library that doesn't come with MinGW but can be installed on MinGW by the user if it is needed. Am I correct?

If that's the case, I would say that it's the user's reponsibility to install the library into /usr/lib or provide the configure script with the appropriate -L options to find it (via the LDFLAGS environment variable).

-- John T.