<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 - clang -MMD only records last source file's dependencies"
href="https://bugs.llvm.org/show_bug.cgi?id=45800">45800</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang -MMD only records last source file's dependencies
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</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>normal
</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>kbob@jogger-egg.com
</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>Created <span class=""><a href="attachment.cgi?id=23442" name="attach_23442" title="sources shown in the description">attachment 23442</a> <a href="attachment.cgi?id=23442&action=edit" title="sources shown in the description">[details]</a></span>
sources shown in the description
When compiling two or more source files into an executable (not 'cc -c') and
creating a make dependency file with -MMD, clang only records the last source
file's dependencies.
Transcript, observe that both.d does not mention one.c.
sim$ ls
one.c two.c
sim$ head *
==> one.c <==
extern void two(void);
int main()
{
two();
return 0;
}
==> two.c <==
void two() {}
sim$ clang -MMD one.c two.c -o both
sim$ cat both.d
both: two.c
sim$ clang --version
Apple clang version 11.0.0 (clang-1100.0.33.17)
Target: x86_64-apple-darwin18.7.0
Thread model: posix
InstalledDir:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
sim$</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>