[llvm-bugs] [Bug 35935] New: tooling::ToolInvocation catastrophic failure if not -fsyntax-only

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jan 12 12:04:34 PST 2018


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

            Bug ID: 35935
           Summary: tooling::ToolInvocation catastrophic failure if not
                    -fsyntax-only
           Product: clang
           Version: trunk
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: asher at strong.ai
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org

Created attachment 19669
  --> https://bugs.llvm.org/attachment.cgi?id=19669&action=edit
Code demonstrating the problem

It seems that clang::tooling::ToolInvocation erases -fno-lto and always creates
2 compilation jobs for any single file (the second job being link to libLTO). 

The result is that clang::tooling::ToolInvocation always fails with the message
"unable to handle compilation, expected exactly one compiler job". 

I am attempting to compile code from a string, and this seems to be the way it
is done. I cannot get code to work either from a virtual file or from a real
file. I have working code for real files using Driver based on
Examples/clang-interpreter. 

Error seems to occur on 5.0 and 7.0. All tests for both 5.0 and 7.0 (from
check-clang) seem to pass as expected. 

Attached file with code.

Asher

-- 
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/20180112/30a8d6fc/attachment.html>


More information about the llvm-bugs mailing list