<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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-cl incorrectly complains about missing lib file if it's in a subdir and "/link /libpath:sub" is passed"
   href="https://llvm.org/bugs/show_bug.cgi?id=27234">27234</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>clang-cl incorrectly complains about missing lib file if it's in a subdir and "/link /libpath:sub" is passed
          </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>Windows NT
          </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>nicolasweber@gmx.de
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>The following works with cl:

C:\src\tmp>type sub\f.cc
int f() { return 42; }

C:\src\tmp>type main.cc
int f();
int main() { return f(); }

C:\src\tmp>cl /nologo /c sub\f.cc /Fosub\f.obj
f.cc

C:\src\tmp>lib /nologo /out:sub\f.lib sub\f.obj

C:\src\tmp>cl /nologo /c main.cc
main.cc

C:\src\tmp>cl /nologo main.obj f.lib /link /libpath:sub



If I do the same with clang-cl, the last step fails like so:

C:\src\tmp>c:\src\llvm-build\bin\clang-cl main.obj f.lib /link /libpath:sub
clang-cl.exe: error: no such file or directory: 'f.lib'


I found this while trying to build ninja with clang-cl, which happens to use
this setup.


(Also, cl also accepts "/link/libpath:sub" without a space and clang-cl
doesn't. I found this while fatfingering the repro above.)</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>