On Fri, Feb 29, 2008 at 6:57 PM, Chris Lattner <[EMAIL PROTECTED]> wrote: > Ok, I'll see what I can do with argv[0]. If this doesn't work on > windows, hopefully someone working there can help :)
Unfortunately, the argv[0] thing is fragile -- there's no requirement that the invoking process fill either argv[0] or PATH in such a way that we can find the executable. It sounds like Mac OS X, Linux and Windows have good robust platform-specific solutions; is there anyone out there who can comment on the other OSes (I guess Solaris and various BSDs at least are interesting). Or perhaps we have to admit that POSIX programs hard-code absolute paths to their data files with good reason ;) There is also the issue of clang-as-library, where should it look for its data files then? Or is this handled outside that scope? -Keith _______________________________________________ cfe-dev mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
