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

    <tr>
        <th>Summary</th>
        <td>
            [lld] cref option doesn't accept single dash form
        </td>
    </tr>

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

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

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

<pre>
    There is an incompatibility between the options handled by `ld` and `lld` in the parsing of the `cref` option. `ld` will accept either one or two dashes in front of the option (i.e. `-cref` or `--cref`) since it has multiple letters. `lld` refuses to accept the single dash option, instead erroring out saying `ld.lld: error: unknown argument '-cref', did you mean '--cref'`.

It looks like the original implementation for `cref` allowed for compatibility with `ld`'s use of both 1 and 2 dashes (https://reviews.llvm.org/D44336), but it was changed in https://github.com/llvm/llvm-project/commit/89e66a3ab3b2958285842ed3705b2264c0f67473 for some reason claiming, "Also delete the single dash form which does not appear to be used.". That broke the compatibility of older code that used to work with both `ld` and `lld`, and we were in fact using the single dash option in our code (https://github.com/KiCad/kicad-source-mirror/blob/cdbb868198389a265fe0a676ea9fcfe87b7a2c10/cvpcb/CMakeLists.txt#L96), and have been for a long time.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUVE2T4yYQ_TX40jUq3JL1cfBhMlOuSmVz2z_QiJZFjEAFaJT59ynweJLJ7mUvNi3g0f3e66YYzdUxn8XpN3F6PdCWZh_OZhmN44AH5fX7-fvMgcFEIAfGjX5ZKRllrEnvoDjtzA7SzODXZLyLMJPTljWodxCttFq0EsjpEtwjc7-wUojGXcFPJRStHANP-cAdqvr3_m6sBRpHXhOwSTMH8I7BB0i7B01x5phhp-BdegDeUUBgbyouYE-fD4QSPmKBA0TjRgaTYKYIy2aTWS2D5ZQ4xOo_2QeetsgRkn9klB_LlVguqXw8LPAFjIuJSQOH4EOpdUsQ6T0vS3FV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