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

    <tr>
        <th>Summary</th>
        <td>
            autoconf tools issue on Windows/MinGW-w64
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
      </td>
    </tr>

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

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

<pre>
    I just figured out why autoconf tools fail to build shared libraries when using clang on native Windows (MinGW-w64 target).

Apparently `configure` checks for the result of `$LD --help 2>&1 | $GREP 'auto-import'`.

When `LD` is set to binutils' `ld` there some matches, including `--enable-auto-import` and `--disable-auto-import`.

But when `LD` is set to LLVM's `ld.lld` there are no matches at all.

This leads to `configure` scripts never generating shared libraries on Windows.

This dirty workaround allows me to build shared libraries for a large number of projects when using LLVM:
```sh
sed -i.bak -e "s/\$LD --help 2>&1 | \$GREP 'auto-import'/true/" configure
```

Would you consider adding a line for the `--enable-auto-import` flag in the help show when running `ld.lld --help`, so autoconf tools can pick it up and goes ahead to build shard libraries?

The flag itself can be a dummy, though I think it's already accepted by the linker.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8lEFv2zgQhX8NfRnIoChbsg86tEldFEiBxWKxOZPiWGRNkQKHjOF_v6DstHHaDWDYgDl682beR0kiO3rEnm0_s-3jSuZkQuxVxMEkkl5jpJUK-tJ_gx-ZEhztmCNqCDnB2VxA5hSG4I-QQnAER2kdpAAqW6eBjCy1zqooo0WCs0EPmawfYXDSjxA8eJnsC8Kz9TqcCZjYfbf-63N1bjeQZBwxMbFfM_7I-Kfr96d5lhF9chdgLS_dF1Os5TAYHE4ExxAhGYSIlF2CcCyFTGyeHqGqDLoZBGu-MNHWwLoHYGLz9e8vfwETXZmnstMcYmKiYy2_6_xc_LOWPz2WZpaAMC3jWp-TdcREV46dLsfJYESgMCFMMg0GiYkHsH5wWZcNsJZXFXqpHFZv27YcpNfXY23pD-d3nj4vSfzZ19PTv9-Z6Ohqau3eGpMRwYdXayATSOfulP8xlsCh1FS03q-ahmjnRODxBSOM6DHKVOb6LfXgX9P9XV7bmC5wDvEkY8heFxMFgwk_wKjEK8EVOMDnSWEsEc8x_MAh3VG2LKC5NSwMLB8y1z8INVR2reQJKgQmBDFxYNuHD0hZDv8HFnFIMWOREAJ-7eq-9x1OITsNl5BLNVmNEaRe2JDgrMefHH-AytHJEaxfyha_ZML5uoKYvb-Bdg3_NtJyFx6AwvvbO0gPsx1OYBPkeaFwDIUNg1Lf5_EmDtYc7mPFm6lE6I6LqEKQoPM0XUrjZEIeDXyDZKwvzRZEpYso9QXkMOCcUIO6LEM5608Y1yvdN3rf7OUK-7rtmpp3-3q_Mn2rh23d6N1239TdIDe7ZreRiu-V2G2VUnxle8FFw2ve1W1db_frdntsucJa10pizRXbcJykdWvnXqZ1iOPKEmXst_td16ycVOjo9QUZ-1JUqTwS23BnKdGvx5JNDvt3S1203twBJg4_X3CrHF1vUpqpQFrAOYw2mazWQ5iYOBTl2091w5uJw6JYdBaD_wUAAP__Z2_aXg">