[cfe-dev] FindExecutable

Daniel Dunbar daniel at zuster.org
Thu Jan 21 11:38:16 PST 2010


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

On Thu, Jan 21, 2010 at 11:24 AM, Jim Crafton <jim.crafton at gmail.com> wrote:
> 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?
>
> Cheers
>
> Jim
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>



More information about the cfe-dev mailing list