<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 - [feature request] New option --no-override-resource-dir to clang-scan-deps to avoid resource-dir discovery"
href="https://bugs.llvm.org/show_bug.cgi?id=47254">47254</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[feature request] New option --no-override-resource-dir to clang-scan-deps to avoid resource-dir discovery
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</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>Tooling
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>romain.geissler@amadeus.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Hi,
In this commit in clang-scan-deps
<a href="https://github.com/llvm/llvm-project/commit/26fa9e31f58a7ff693f3a5d8c2eb1b6a5a13b133">https://github.com/llvm/llvm-project/commit/26fa9e31f58a7ff693f3a5d8c2eb1b6a5a13b133</a>
was added the logic of infering the "resources-dir" of the underlying compiler
(somehow hoping it's clang) and then pass this resources dir to the current
clang-scan-deps process (which is clang based, but maybe not the exact same
clang version, nor installed in the same place). For now the only way to bypass
this logic is to explicitly pass a "-resource-dir" argument.
I have the scenario where my compilation database contains entries, but not
using clang as the compiler, but gcc (in my company the main compiler is stil
gcc, and this won't change for now). However I wish I could use the faster
clang-scan-deps to generate dependencies. I already have some small patches in
clang to ignore the very few gcc-only flags that our company uses, so that for
example passing "-ffat-lto-objects to our own copy of clang doesn't raise any
warning.
Right now if I use "clang-scan-deps" on my gcc-based compilation database, I
have warnings for every entry of the database, it's actually gcc warning about
unknown command argument "-print-resource-dir". I can't just redirect
clang-scan-deps'stderr to /dev/null as I really want to know when there are
errors and which ones, yet I don't want my stderr output to be clobbered by all
these "-print-resource-dir" issues from gcc. In my case, I also have somehow
the garantee that the llvm toolchain containing clang-scan-deps and either the
gcc or clang compiler are really from the same toolchain (same installation
folder). So really the "-resource-dir" that should be used can be the default
one of "clang-scan-deps".
So, would it be possible to have a new optional flag possibly named
"--no-override-resource-dir" to avoid doing this resource dir inference and
overring altogether (ie give back the behavior of "clang-scan-deps" prior to
commit
<a href="https://github.com/llvm/llvm-project/commit/26fa9e31f58a7ff693f3a5d8c2eb1b6a5a13b133">https://github.com/llvm/llvm-project/commit/26fa9e31f58a7ff693f3a5d8c2eb1b6a5a13b133</a>
?
Cheers,
Romain</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>