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

    <tr>
        <th>Summary</th>
        <td>
            [clang-cl] --precompile make -fmodule-output directory ignored
        </td>
    </tr>

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

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

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

<pre>
    when using clang-cl, --precompile seems to force the pcm file to be generated in the directory when clang is invoked instead of respecting -fmodule-output

<img width="627" alt="Image" src="https://github.com/user-attachments/assets/caccd108-91f3-471a-92ec-71497a4ab889" />

```
// test.mpp
export module Test;
```

```
> F:\llvm\bin\clang-cl -std:c++20 -x c++-module -fmodule-output=a\test.pcm test.mpp -c
```

```
F:\llvm\bin\clang-cl -std:c++20 -x c++-module -fmodule-output=a\test.pcm test.mpp --precompile
```
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJy8k82OpDgMx58mXKyUQkIKOHCojy5p7_sCITGQbSAoMf2xTz-Cqp7p6ZH6OFIkcJzYP8f-m5R8PyM2TJ-ZvmZmpSHE5hRpMMv_WRvce_M64Axr8nMPdjRzz-3I5AU4XyLaMC1-REiIUwIK0IVoEWhAWOwE3eajAC1CjzNGQ-jAz7vf-YiWQnyHPcEeGnwCP7-E5_1YIjQOQgcR04KWNgLeTcGtI_Kw0rISE6dtqYufenj1jgamrkzKoyyZlGBGutv_TKbHbSdFe98ZiJbE1InJG5O33tOwtgcbJiZva8LIDZGxw4QzJSZvJiXcf6yx1uWi4nXeKV6UueG1RMvLvKhLU5i2quotzxZWPT3wjuKxxCMdECY6TMvCxAnflhAJ7mXBv5iIqfPXW19M9QS3jV1fxvFlYvrS-pnpy0d7gCdyTJ0sk2cmz1IAf4OHwR-Jvj6kuhqmLzvX1rkPQOD2e5a_xvFp3D4jZK5Rrla1ybDJy6Isq7KqdDY0-VFYi63W6tgehepUblVddFgVRe5al2e-kUJqoWUuhKqEPri6yEXpyu5oVC67IysETsaPh624Q4h95lNasckLUUmdjabFMe3KkXLGV9i9TMpNSLHZLvF27RMrxOgTpV9hyNO4S-6nnvT1dz1N5vmPp_mkGN_PIaLL1jg23wzy3pT7hy8x_IeWmLztmNssP-p4aeSPAAAA__-flD6A">