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

    <tr>
        <th>Summary</th>
        <td>
            [C++20][Modules] Make using STL header units practical
        </td>
    </tr>

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

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

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

<pre>
    Hello,

It seems that currently, producing and using STL header units to be used by `mymodule` only works with stdlibc++, and the only way to use them is to:
- precompile them manually through a somewhat arcane command line (that's probably ok)
- and then specify each single one of them to the compiler through `-fmodule-file=vector.pcm`, for *each* header used by `mymodule` (that's quite terrible)

Is that a correct assessment of how those are supposed to be used?

If yes, it would seem that the only practical way to compile *anything* that uses STL header units is to shove one `-fmodule-file=` option in the command line for all STL headers everywhere, and pray that this won't incur too much overhead if some or most of those are not used?

Is there any plans to go in a direction in which this limitation would be somehow lifted?
Or was the vision for that problem, that it was supposed to be handled by the tooling? Would that mean the tooling is expected to first scan modules for imported header units, and then compile them accordingly?

Thanks !
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0VFuP6jYQ_jXmZbSr4GxgeeBhL0Kt1KM-9Eh9njgT7K4vqceG5t9XdoDlnG4lBCS257uNB5nN0RPtRfcquvcV5qRD3Ot8DOhWfRjm_S9kbRDyTTTvonlZvn9NwESOIWlMoHKM5JOdhXyDKYYhK-OPgH6AzOXfH99_A004UITsTWJIAXqCzDRAP4PYNG52YciWxKaB4O0M5xA_GM4maeA0WNMrIV_r560WTpouG3Eu5TJTeefAlOqivRB9gCmSCm4y9rLu0Ge0doakY8hHDQgcHJ2LEIwKPYEKzhUMazyBkM9FpJBbLtp67O0M4UPI3RXhQscDT6TMOAOh0lCE28KRIIwLdAqV9oVOvDEQm-ZhXPQ_jMaSaN9PpFKIj5NyYtMUzWOIIORLKS3ky83Nrx285_x3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