[llvm-bugs] [Bug 42186] New: clangd is making incorrect assumptions about the compilation command
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Jun 7 11:18:15 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=42186
Bug ID: 42186
Summary: clangd is making incorrect assumptions about the
compilation command
Product: clang-tools-extra
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: clangd
Assignee: unassignedclangbugs at nondot.org
Reporter: juliehockett at google.com
CC: llvm-bugs at lists.llvm.org
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?
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190607/851dd46e/attachment-0001.html>
More information about the llvm-bugs
mailing list