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

    <tr>
        <th>Summary</th>
        <td>
            `llvm-config --link-static` does not specify `ntdll.lib` import lib on Windows
        </td>
    </tr>

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

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

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

<pre>
    When linking against LLVM statically, the `llvm-config` tool with `--link-static` does not specify the `ntdll.lib` import library despite `LLVMSupport` requiring `ntdll` since `Support/ErrorHandling.cpp` depends on `RtlGetLastNtStatus`. Attempting to link anything with it will be met with the following error
```
error: undefined symbol: __declspec(dllimport) RtlGetLastNtStatus
 >>> referenced by LLVMSupport.lib(ErrorHandling.cpp.obj)
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJyEkk9v1DAQxT-Ncxlt5Dh_2hxyWKALh8KBSvRYOfYkcXHsYE-6yrdHznZFESAkS5FmXmbePP1kjGZ0iB2r37H6QyZXmnzoxiCXyRDOMhKGrPd66x4ndGCN-27cCHKUxkWC-_tvnyGSJKOktRsT74EmBNZwa1_mg_JuMCNrOJD3Fs6GptQ7HNKcw-W_1NUeIzhPEBdUZtiuQxxpa3Nr-iQy8-IDgTV9kGEDjXExtMuSi4d1Se0kDPhjNSHZvI5I1Wic2tVXpTjdheDDJ-m0NW7M1bLsXnBBpyN4l8RfyX5EupeRvtADSVoja3gORyKcF0o7yO-pgHQbTamwX2kIzsZa6BFmpEstHTV4a_05yTAtZ_zIGv76-PFSK4-wOo2DcaghbnPvbao9PWlUNiXExK229pIHEy38xSQ_AivvLg8CDhjQKdTQb_AmrT1acftHDrnvn5lo37rLdFfqtmxlhl1xU_OqaoqCZ1NXImIvsO11rZsblGJQApUYuLiVgypUZjrBRc0bwYuWF1Wby1KKsteIkouqFjWrOM7S2Dwxk_swZibGFbuiqnlbZFb2aONOqBAOz7B3mRAJ2NDtoPXrGFnFrYkUf40hQxa732GE_8P3b_ASFI_GaX-O2RpsNxEtkZVHJk5MnEZD09rnys9MnNLK189hCf4ZVSJutx6ZOL3e9tKJnwEAAP__uMkqkw">