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

    <tr>
        <th>Summary</th>
        <td>
            Building LLVM on Windows with "cmake -DCMAKE_BUILD_TYPE=Debug" generates binaries with no debug information
        </td>
    </tr>

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

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

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

<pre>
    On Windows, in a Visual Studio debugger command window, build LLVM like so:

```
>cmake -S llvm -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DLLVM_ENABLE_ASSERTIONS=ON
>ninja -C build
```

The generated binaries have no debug info (no PDB files).

The reason seems to be that the linker command-line is missing the "/DEBUG" option.

I think I have a reasonable fix for this, which I'll be happy to submit.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0Uk9vozoQ_zTmMiIihpTkwCGUpMp7aVq9pH3aU2TDBKYxdoRNs_32K1PaqqtdCRkhxvP7K6ylWiNmbJazWRGI3jWmyw4N_nO7zANpqrfsQcP_pCtztYzfAmkQ8Ey2Fwr2rq_IQIWyr2vsoDRtK3QF12HcT8ueVAXb7fM9KDojWMPiJYsKFn2cN9H4vH_Gq7IVZ4RwD0q9thDm447wDnakXwSExe398t_VMX_abIvj4cfjisVF4SlAWHik42q3zLer43K_X_132Dzs9iwuHnafAPp9zUjuzzSG89Ag1KixEw4rkKRFR2ihEa8IepQNpE8GGJ9rA49FDidSaBlfTH5f1KGwRoNFbC04AxLBNcKBaxAU6fOXfaEijUAWWrKWdD2MMM4ZXxer_OmOcQ7m4sjobyAbcA3pM2zeCYoRUUiFcKKfcDKdnxhCvDZUNrBhPFXKM2nE5fLmWdletuQmQZXF1SJeiACzacpnySKeTtOgycrTdDGTpyrmcn5TRmkqy3KayEUkMMKbZBZQxiOeRIso4XE8j9NJmsaJLMtqLqtTVFYpSyJsBamJj3diujoga3vMplEa83mghERlhzpyrvEKw1-vflYEXeYvhbKvLUsiRdbZrzWOnMIs95l604bOmc_qwpVc410c6_XXEnl3P0K3X6EP17-F3rXCZxD0ncoa5y7WN5uvGV_X5JpeTkrTMr72_MZXeOnMC5aO8fWgyjK-HmW_ZvxXAAAA__-BOR0z">