[PATCH] D63092: [Frontend] Use executable path when creating invocation from cmdline

2019-06-11 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Thanks for pushing on this. I guess this must affect all clang-tools when used with a wrapper, which seems important. (I've just been using bazel and local cmake, so haven't hit this myself). In D63092#1536890 , @phosek wrote:

[PATCH] D63092: [Frontend] Use executable path when creating invocation from cmdline

2019-06-10 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. One more thing, do you think it's reasonable to use `llvm::sys::findProgramByName(Args[0])`instead of `Args[0]` when creating the driver instance? One of the failure modes I ran into is the case where the generated compilation database would contain just the executable n

[PATCH] D63092: [Frontend] Use executable path when creating invocation from cmdline

2019-06-10 Thread Petr Hosek via Phabricator via cfe-commits
phosek added a comment. In D63092#1536774 , @sammccall wrote: > `argv[0]` does carry important information though, I think this will break a > lot of things. It's... concerning that no tests broke. > > For example, if it's `clang` or `g++` or `clang-cl` t

[PATCH] D63092: [Frontend] Use executable path when creating invocation from cmdline

2019-06-10 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. Herald added a subscriber: ormris. `argv[0]` does carry important information though, I think this will break a lot of things. It's... concerning that no tests broke. For example, if it's `clang` or `g++` or `clang-cl` then that affects how command lines are parsed (r

[PATCH] D63092: [Frontend] Use executable path when creating invocation from cmdline

2019-06-10 Thread Petr Hosek via Phabricator via cfe-commits
phosek created this revision. phosek added reviewers: ilya-biryukov, sammccall, bkramer, echristo. Herald added subscribers: cfe-commits, kadircet. Herald added a project: clang. Args[0] isn't necessarily a correct path, it may not even be the path to the compiler, for example when using tools lik