<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/55948>55948</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            [LLD] lld-link does not handle paths with backslashes correctly
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          alexchandel
      </td>
    </tr>
</table>

<pre>
    When targeting Windows/MSVC, many build tools pass call `link.exe` (=> lld-link) with paths with backslashes.

LLD does not handle these correctly.  For example, passing the global library path `/libpath:\opt\sysroot\windows\…etc…\lib\um\x64` to lld-link causes it look for the file `\opt\sysroot\windows\…etc…\lib\um\x64`.  lld-link should behave like `link.exe` does, and handle paths with backslashes, converting this to `/opt/sysroot/windows/…etc…/lib/um/x64`, if that path exists.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJytkstyozAQRb9GbFShFPGIWbDw2GGVWU3VZC1BAxq3kUsSfvz9tGDsVKW8nE3TQo8-93Zr293qzxEmHpQbIJhp4J9m6uzFM9n8_PV7x-SOH9V043o22PFgLXp-Ut7zViFyVgo00yGFK1DKmdywbM-yd47YvcQdJit-MWGkO2H0a6pVe_Co_Ag-ZWLPxHaNHx973lnwfLKBj2rqEHigQ8Bb6xy0AW8p5411HK7qeEKIcJElYtNBPqDVCjka7ZS7LSUjIUmhX3HFsi0rdvYUKPqbd9bG7PJPcbFj75JtBNuWENpHTv_pOsX5SOFa5lFpsA-J5MTsidoEjtYeeE-AkaY3xB_L_5eKpPxR0I92pmZoGNUZSO4Bvjci2hjdIRPvTj5vQDzU2ukMLqwuGh-1ra5FbNncsWVzeYzGc-zFZ4qELZsVO75venpXhbUfcDU--DTp6qyrskolwQSEmhU_qP2s2H-p_D4KzwV8zUYyO6zHEE4-tpkYZTPQ4VmnrY1AiOf75-Xk7B-6REvj_RxtaIqiyjfJWENedZWuZK-zUhdVL4ou76HICmhFpkWVoNKAPhIzKSe48OUJyok-MbUUUopSbF4r8VaINIcSXrsyy9uuVeKtYrmAozKYRo7UuiFx9YKk58HTJi72PDbjdA8TLAbF99UcRutqhXBtoy-AyVK-XvD_AvKYO4c">