[llvm-bugs] [Bug 44092] New: clang-scan-deps is incompatible with a clang-cl compilation database

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Nov 20 11:52:58 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=44092

            Bug ID: 44092
           Summary: clang-scan-deps is incompatible with a clang-cl
                    compilation database
           Product: clang
           Version: 8.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Tooling
          Assignee: unassignedclangbugs at nondot.org
          Reporter: rnk at google.com
                CC: llvm-bugs at lists.llvm.org

clang-scan-deps starts right off by assuming a GCC-style clang command line,
which is simply not present in a compilation database containing clang-cl
command lines:
https://github.com/llvm/llvm-project/blob/a9bb669e59f4b2270caa8a35128ca3b2de0595fe/clang/tools/clang-scan-deps/ClangScanDeps.cpp#L183

Basically, clang-scan-deps is reimplementing a small percent of clang's command
line parsing logic. This seems less than ideal. It seems like the Tooling
argument adjuster API is very stringly typed and decoupled from the ArgList /
Option library that the actual driver uses to parse command line options.

What can we do to fix this in the short and long term, assuming that people
will continue to produce compilation databases with clang-cl? We don't have
anything that rewrites from clang-cl command line syntax to GCC clang syntax,
but I wonder if that would be the simplest way forward that ensures that as new
tools are added they are more likely to support Windows out of the box or with
minimal effort.

-- 
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/20191120/c18666ae/attachment-0001.html>


More information about the llvm-bugs mailing list