<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - clangd is making incorrect assumptions about the compilation command"
   href="https://bugs.llvm.org/show_bug.cgi?id=42186">42186</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clangd is making incorrect assumptions about the compilation command
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang-tools-extra
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>clangd
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>juliehockett@google.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Recently, clangd started failing for some of our developers because it started
making the assumption that the first argument in the compilation command is the
compiler. This is incorrect if you're using a distributed compiler service
(e.g. ccache or goma), since the spec for the compilation database says:

command: The compile command executed. After JSON unescaping, this must be a
valid command to rerun the exact compilation step for the translation unit in
the environment the build system uses. Parameters use shell quoting and shell
escaping of quotes, with ‘"’ and ‘\’ being the only special characters. Shell
expansion is not supported.

With this in mind, our build system emits exactly the compilation command used
(e.g. `/usr/goma/gomacc /usr/bin/clang++ foo.cpp`) without stripping the prefix
off of it. 

Could we either remove the assumption, or update the spec to be more specific
and include that the first argument should be the compiler?</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>