So this happens because c-index-test would silently drop argv[0] and not
pass it to the driver (this happens in write_pch_file from
'c-index-test.'c).
The fix that comes to mind is starting to pas argv[0] there (it's simple
apart from argv manipulation in C, which might require some boilerplate).
This change got reverted, but the follow-up r348365 might be causing the
issues.
I wonder why the Driver can't detect install dir on its own, will take a
look, thanks.
On Mon, Jan 28, 2019 at 7:20 PM Nico Weber wrote:
> This seems to fix it, but I don't know if it's the right fix:
>
> diff --git
This seems to fix it, but I don't know if it's the right fix:
diff --git a/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp
b/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp
index b62416ffd9e..d933f8c1b70 100644
--- a/clang/lib/Frontend/CreateInvocationFromCommandLine.cpp
+++ b/clang/
I think c-index-test has the same problem:
$ cat test.cc
#include
$ out/gn/bin/c-index-test -write-pch foo.pch test.cc
test.cc:1:10: fatal error: 'iostream' file not found
Since https://reviews.llvm.org/rL350714 was a driver-side fix and
c-index-test doesn't use lib/Driver, it didn't do anything
Glad to help. The fix has landed. Let me know if the problem persists after
it's integrated.
On Tue, Jan 8, 2019 at 7:36 PM Nico Weber wrote:
> That looks like it should help. Thanks for the quick fix!
>
> On Tue, Jan 8, 2019 at 1:11 PM Ilya Biryukov wrote:
>
>> Hi Nico,
>>
>> This is clearly a
That looks like it should help. Thanks for the quick fix!
On Tue, Jan 8, 2019 at 1:11 PM Ilya Biryukov wrote:
> Hi Nico,
>
> This is clearly a bug, it's supposed to search in a sibling directory.
> Are you running clang as './clang' in the scripts? The code seems to
> break in that case, https:
Hi Nico,
This is clearly a bug, it's supposed to search in a sibling directory.
Are you running clang as './clang' in the scripts? The code seems to break
in that case, https://reviews.llvm.org/D56446 should fix this.
On Tue, Jan 8, 2019 at 5:12 PM Nico Weber wrote:
> It looks like clang now l
It looks like clang now looks for libc++ headers in -internal-isystem
Release+Asserts/bin/include/c++/v1 , compared to -internal-isystem
Release+Asserts/include/c++/v1. `make install` puts the libc++ headers in
Release+Asserts/include, the old location. Was this an intentional change?
As-is, this
Author: ibiryukov
Date: Mon Nov 12 05:55:55 2018
New Revision: 346652
URL: http://llvm.org/viewvc/llvm-project?rev=346652&view=rev
Log:
Make clang-based tools find libc++ on MacOS
Summary:
When they read compiler args from compile_commands.json.
This change allows to run clang-based tools, like c