This may require several minutes and use approx. 0.5 GB.
If you are working on LLVM's debug install, it is a good idea to name
the dll LLVMd.dll or something to differentiate it from the release
7. This creates LLVM.dll. Move it to LLVM's /lib directory. Put a copy
somewhere on your PATH.
8. On your application's makefile, remove all references to files on
LLVM's /lib directory (libraries, LLVMX86.o, etc) and just use -lLLVM.
This way we have a single big dll that we use just like an .so file on
GNU/Linux. Link times decreases dramatically (using the debug build,
link time decreases to ~10%).
Caveats: For some reason, while doing this process for the debug intall
of LLVM, the creation of the dll fails with this:
d:/dev/lib/llvm-2.1-d/lib/m $ g++ -shared --export-all-symbols -o LLVMd.dll *.o -lpsapi -ldbghelp
ProgramInfo.o: In function `~SourceFileInfo':
d:/dev/lib/llvm-2.1/lib/Debugger/ProgramInfo.cpp:123: multiple definition of `llvm::SourceFileInfo::~SourceFileInfo()'
MachineModuleInfo.o:d:/dev/lib/llvm-2.1/include/llvm/CodeGen/MachineModuleInfo.h:865: first defined here
collect2: ld returned 1 exit status
This is "fixed" by ignoring libLLVMDebugger.a or its contents on step 5,
as indicated. SourceFileInfo does not declare a destructor, but one is
defined in ProgramInfo.cpp. I don't know wath is going here.
It would be good to create dll's "the Windows way", which works for VC++
too, but this requires modification of the source code. I expect to
address this on a future message.