<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 - tooling::ToolInvocation catastrophic failure if not -fsyntax-only"
href="https://bugs.llvm.org/show_bug.cgi?id=35935">35935</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>tooling::ToolInvocation catastrophic failure if not -fsyntax-only
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Macintosh
</td>
</tr>
<tr>
<th>OS</th>
<td>MacOS X
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>release blocker
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>asher@strong.ai
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=19669" name="attach_19669" title="Code demonstrating the problem">attachment 19669</a> <a href="attachment.cgi?id=19669&action=edit" title="Code demonstrating the problem">[details]</a></span>
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</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>