I was just playing with llvm-ld, and noticed that it keeps giving me
errors that it can't find "llc", even though it's in the same
directory. This is running on windows, built with visual studio 2008.
Stepping through the code, I notice that llvm::FindExecutable() is
looking for "llc" not "llc.exe", which means, on windows at least,
that it will *never* find the compiler. Would a simple fix be to just
append a ".exe" to the ExeName parameter if the search fails and
search again? Or is there a better approach?



FYI, this is probably more appropriate to llvmdev.

I think someone had a patch on the llvmdev/llvm-commits list to deal
with this. Just appending .exe isn't really correct, it should also
respect .bat and the user definable things. It imagine there is a
Win32 function to help with this, but don't know what it is. The ideal
approach is to make sure the function does exactly what cmd.exe does.

- Daniel