[cfe-dev] clang doesn't know about it's installation prefix when searching header files
sanxiyn at gmail.com
Sat May 31 09:09:52 PDT 2008
2008/5/30 Holger Schurig <hs4233 at mail.mn-solutions.de>:
> So, should I amend llvm::sys::Path::GetMainExecutable so that it:
> * check if there is a "/" in the path?
> * if not, iterate over env['PATH'] to search for itself and
> use the first match?
"GetMainExecutable" is a tricky function to implement in
cross-platform way. The standard Linux method is to resolve symlink
/proc/self/exe. On Windows, you call GetModuleFileName. See
http://autopackage.org/docs/binreloc/ for extensive discussion.
More information about the cfe-dev