<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 - -B options are not translated into -L options for the linker"
href="https://bugs.llvm.org/show_bug.cgi?id=46875">46875</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>-B options are not translated into -L options for the linker
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>10.0
</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>rixript@gmail.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>Steps to reproduce:
* Create a dummy file, which can be linked, e.g.
int main() { return 0; }
* Execute:
<span class="quote">> $ mkdir ADD_ME_AS-L
> $ clang++ main.cpp -B ADD_ME_AS-L --verbose 2>&1 | grep ADD_ME_AS-L --color=auto
> <no output>
> $ g++ main.cpp -B ADD_ME_AS-L --verbose 2>&1 | grep ADD_ME_AS-L --color=auto
> <outputs line where LD is executed with -LADD_ME_AS-L option></span >
According to the docs:
-B prefixes that effectively specify directory names also apply to libraries in
the linker, because the compiler translates these options into -L options for
the linker.
But clang does not do that.
For more details, see:
<a href="https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html">https://gcc.gnu.org/onlinedocs/gcc/Directory-Options.html</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>