<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 - cc1as breaks hard-linked cache entries of ccache"
href="https://bugs.llvm.org/show_bug.cgi?id=39782">39782</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>cc1as breaks hard-linked cache entries of ccache
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</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>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Driver
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mail+llvm@tzik.jp
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>As cc1as overwrites the output file without using a temporary file, it breaks
hard-linked cache entries of ccache. Here is the corresponding ccache issue:
<a href="https://github.com/ccache/ccache/issues/331">https://github.com/ccache/ccache/issues/331</a>
That is, `cmp bar.o baz.o` at the last line of below should not hit.
echo '.octa 0x0' | clang -cc1as -triple x86_64-pc-linux-gnu - -o foo.o
ln -f foo.o bar.o
cp foo.o baz.o
echo '.octa 0x1' | clang -cc1as -triple x86_64-pc-linux-gnu - -o foo.o
cmp bar.o baz.o
cc1as opens the file directly here[1], while other tools uses the temp file
through CompilerInstance[2].
[1]:
<a href="https://github.com/llvm-mirror/clang/blob/ae4b8efe92f4f30b36da73166ac89a7dc50ba917/tools/driver/cc1as_main.cpp#L348">https://github.com/llvm-mirror/clang/blob/ae4b8efe92f4f30b36da73166ac89a7dc50ba917/tools/driver/cc1as_main.cpp#L348</a>
[2]:
<a href="https://github.com/llvm-mirror/clang/blob/ae4b8efe92f4f30b36da73166ac89a7dc50ba917/lib/Frontend/CompilerInstance.cpp#L768">https://github.com/llvm-mirror/clang/blob/ae4b8efe92f4f30b36da73166ac89a7dc50ba917/lib/Frontend/CompilerInstance.cpp#L768</a></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>