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

    <tr>
        <th>Summary</th>
        <td>
            Windows build failure with -DLLVM_EXPORT_SYMBOLS_FOR_PLUGINS: too many symbols exported
        </td>
    </tr>

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

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

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

<pre>
    Back for round 3 ([ref](https://github.com/llvm/llvm-project/issues/60109) [ref](https://github.com/llvm/llvm-project/issues/56109))

The included `PrintFunctionNames` example fails to link because clang exports 82789 symbols.
[clang.symbols.zip](https://github.com/llvm/llvm-project/files/14892264/clang.symbols.zip)

error message
```
LINK : fatal error LNK1189: library limit of 65535 objects exceeded
```

cmake invocation
```
cmake -A x64 -Thost=x64 ^
        -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra" ^
        -DLLVM_EXPORT_SYMBOLS_FOR_PLUGINS=1 ^
        -DCLANG_PLUGIN_SUPPORT=1 ^
        -DCLANG_BUILD_EXAMPLES=1 ^
        -DLLVM_ENABLE_IDE=1 ^
        -DLLVM_INCLUDE_BENCHMARKS=0 ^
        -DLLVM_INCLUDE_EXAMPLES=0 ^
        -DLLVM_INCLUDE_TESTS=0 ^
        -DLLVM_TARGETS_TO_BUILD=X86 ^
        -DCMAKE_ASM_COMPILER=%COMPILER% ^
        -DCMAKE_C_COMPILER=%COMPILER% ^
        -DCMAKE_CPP_COMPILER=%COMPILER% ^
        -Wno-deprecated ^
        ..\llvm
```

Clang version 18.1.3
VS version 17.10.0
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysVN2O4jgTfRpzYxE5Tpyfi1wEEvrj6_AjoGd6ryInNuBtJ0a20w379KsEeqd3lh7NjlayjFx16tinSB1qjDi0nCeATADJRrSzR6UT-lJdNBtVil2SCa1f4F5pqFXXMuhBgCNAJprvAckAjo7WngzwUoBnAM8Owh67yqlVA_BMytf3n_FJq995bQGeCWM6bgCeBchFMcAx_G_oSHCl6xfKAEqv--7IoWhr2THOIAjQWovWzrq2tkK1S9pwAwIE-Zk2J8nhngppoFVQivYFVrymneGwlrQ9QH4-KW0NjHAYxdBcmkpJ49zuIpMB5LyH_xCnXxS0F3LQ4_pRjHHgAzz7J_XfNXKtlYYNN4Ye-C0RoNsajsV8-QiBl8I9tVTCa0GxfHTdKO7DUlSa6guUohEWqj0MCPEIVFX_KAP5ueaccXaX-7rXDX3pO_2qatq39i70Chqn8Bz4cLw7KmOBl_UHQPJ3tnicFcWXRZkv00mRl-vN6v_5dLcFXgYwHloBvGu3x1Ypacb8bDUFGN8leV6vNrty-9tisiq25Wy1KdfF08N82fO531VMi3T5cMuX26d1X_opbPI0L7Iyf04X6yK_x_ZRxDzLP0PMl9PiKcvLSb6c_m-Rbh57LvQj5Ic7f4jb5dvdp6BdunnId9tyt7oqAV72HAXfK12kj3mZbhfldLVYz4t8M_wL5K8TJncrpv8Wv17_bMXXVo0ZP2leU9tP9Iec4wAyHYbq8890OozyK9dGqBa6keM63jXzZfstHDouctCIJR6LvZiOeOKGLvbCyAuD0TEJGdlXLCAYhV7o1_uA1V4Yx0GMiB_wmoxEghH2kY8C5HuxFzghCyPEkRt4LKr8mAAf8YYK6fTPdZQ-jAYfS6IwCshI0opLM5gyxi1_g0MSYNx7tE4Gw6i6gwE-ksJY843FCit58lW0TL0ZWHVCssHTOs3hm7BH-BNjkUKrFGxoe3k3uZv1cTbqtEx-3aIHdX8GAAD___uY3nw">