Bug ID: 41195
           Summary: clangd-indexer fails using concurrency with multiple
           Product: clang-tools-extra
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: clangd

I reported this to the mailing list but it may be more appropriate here.

clangd-indexer does not seem to handle compile_commands.json with different
directories. I am able to workaround the problem by passing

It seems to work ok with a single directory (i.e with just 'abc' from the
example below), but fails if there are multiple, as in the example below.
I am working with revision 356635 of clangd.

With a directory structure of:


And a compile_commands.json of:

        "arguments": [
        "directory": "/home/test/abc",
        "file": ""
        "arguments": [
        "directory": "/home/test/def",
        "file": ""

I receive the error:

[test]$ clangd-indexer -executor=all-TUs compile_commands.json  > clangd.dex
[1/2] Processing file /home/test/abc/
[2/2] Processing file /home/test/def/
error: no such file or directory: ''
error: no input files
error: unable to handle compilation, expected exactly one compiler job in ''
Error while processing /home/test/abc/
Failed to run action on /home/test/abc/

I assume it may be related to a non-thread-safe chdir somewhere in the code.

You are receiving this mail because:
You are on the CC list for the bug.
llvm-bugs mailing list

Reply via email to