<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/95273>95273</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
lld-link can not resolve relative path for MSVC linker LIBPATH:
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
lygstate
</td>
</tr>
</table>
<pre>
[build] C:\WINDOWS\system32\cmd.exe /C "cd . && "C:\Program Files\CMake\bin\cmake.exe" -E vs_link_dll --intdir=src\YY-Thunks.UnitTest\CMakeFiles\api-ms-win-core-fibers.UnitTest.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100261~1.0\x86\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100261~1.0\x86\mt.exe --manifests -- C:\PROGRA~1\MICROS~2\2022\COMMUN~1\VC\Tools\Llvm\bin\lld-link.exe /nologo src\Thunks\CMakeFiles\win-polyfill-override-dll.dir\win-polyfill-override.cpp.obj src\YY-Thunks.UnitTest\CMakeFiles\api-ms-win-core-fibers.UnitTest.dir\api-ms-win-core-fibers.UnitTest.cpp.obj /out:bin\api-ms-win-core-fibers.UnitTest.dll /implib:lib\api-ms-win-core-fibers.UnitTest.lib /pdb:bin\api-ms-win-core-fibers.UnitTest.pdb /dll /version:0.0 /machine:X86 /debug /INCREMENTAL -LIBPATH:C:\PROGRA~1\MICROS~2\2022\COMMUN~1\VC\AUXILI~1\VS\UnitTest\lib lib\win-polyfill-static.lib && cd ."
[build] LINK Pass 1: command "C:\PROGRA~1\MICROS~2\2022\COMMUN~1\VC\Tools\Llvm\bin\lld-link.exe /nologo src\Thunks\CMakeFiles\win-polyfill-override-dll.dir\win-polyfill-override.cpp.obj src\YY-Thunks.UnitTest\CMakeFiles\api-ms-win-core-fibers.UnitTest.dir\api-ms-win-core-fibers.UnitTest.cpp.obj /out:bin\api-ms-win-core-fibers.UnitTest.dll /implib:lib\api-ms-win-core-fibers.UnitTest.lib /pdb:bin\api-ms-win-core-fibers.UnitTest.pdb /dll /version:0.0 /machine:X86 /debug /INCREMENTAL -LIBPATH:C:\PROGRA~1\MICROS~2\2022\COMMUN~1\VC\AUXILI~1\VS\UnitTest\lib lib\win-polyfill-static.lib /MANIFEST /MANIFESTFILE:src\YY-Thunks.UnitTest\CMakeFiles\api-ms-win-core-fibers.UnitTest.dir/intermediate.manifest src\YY-Thunks.UnitTest\CMakeFiles\api-ms-win-core-fibers.UnitTest.dir/manifest.res" failed (exit code 1) with the following output:
[build] lld-link: error: could not open 'x86\Microsoft.VisualStudio.TestTools.CppUnitTestFramework.lib': no such file or directory
```
The LIBPATH:C:\PROGRA~1\MICROS~2\2022\COMMUN~1\VC\AUXILI~1\VS\UnitTest\lib
The lib 'x86\Microsoft.VisualStudio.TestTools.CppUnitTestFramework.lib':
And the absolute path of lib is C:\PROGRA~1\MICROS~2\2022\COMMUN~1\VC\AUXILI~1\VS\UnitTest\lib\x86\Microsoft.VisualStudio.TestTools.CppUnitTestFramework.lib
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzsVk1vozgY_jXOxQKBKaEcODCk7EabpFWbdmZOI2O_BE8NRrZJ20t_-8okTDP7oY66Xc1lJAQY-33er-exocaIXQeQofgDihczOthG6Uw-7YylFmaV4k9urhqE5Che4AJFOYqLj8vN4vLjDYoL82QstBFBccFa7sMjYETKAiNCGMc-RmSOyNwNj6ZXWu00bXEpJBgUF8Wa3gOKi0p0Iwa9B4eCCMHeBd6bL1J091-4lNjzRGe50ChaGM1QXHz-7G2bobs3_m0n7BaMnfAmcNoLrzXeg-g8pjR4tahAvyz3udDY8zRD0WIK7_ryt-v8mYxJRkVJnkMUF2HwLcIwCMg8fA599-nxfI7iQrMxb89r7X8Dau0ERDtRg7EGY8_D3yM6mPWyuL68GcFJQNyjuFyvbzfj5F2B4mKrlHQVWMl9-82llNxz5Zza1Cmpdgofqnko5V8r6Er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