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

    <tr>
        <th>Summary</th>
        <td>
            Continue fixing recent regression in clang modules support in libc++
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            libc++,
            clang:modules
      </td>
    </tr>

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

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

<pre>
    Since years we have had a single top-level module for `std` in libc++ and it worked flawlessly for years.

Now libc++ decided to move to a single module per header file which generated hundred of modules. The reason is unclear to me but some contributors mentioned that using `no_undeclared_includes` to resolve issues with non-modular headers was a workaround. I've humbly disagreed with that statement because it is a feature designed to resolve such setups. The downside of moving towards this is we penalize downstream clients whose workflows break with every release now (see https://github.com/root-project/root/pull/16494)

We have made some progress in going back to where we were years ago with https://github.com/llvm/llvm-project/issues/86193 and a few related issues. As a matter of fact https://github.com/ldionne/llvm-project/commit/6bd36bf8a5cf45f0e20f8eb42ebe658e3301fe97 reports significant performance improvements:

```
This patch provides almost an order of magnitude compilation time improvement when building modularized code (certainly subject to variations). For example, including <ccomplex> without a module cache went from 22.4 seconds to 1.6 seconds, a 14x improvement.
```

My suggestion was (and still is) to move back to a single module consisting of multiple submodules. There is no fundamental reason why we would not be able to do so, unfortunately, all discussion so far said it was not possible and refused to elaborate and share a reproducing example where we can help with our clang modules expertise.

This is a critical problem for the entire community and we are stuck and I do not understand why.

cc: @zygoloid, @Bigcheese, @ldionne, @ChuanqiXu9.
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJycVU2P47gR_TX0pTCGTPnz4ENPJw3sIblkgOS2KJEliRmKVFik1Z5fHxQtz_T2YQ8LNNqtNlX13qtXj8jshkB0VYevSmtvXQyBlNbq8LcNljzGdL0NNznm6bbpor1f_-WCIbgTJoaFYMSb_LKAwC4MniDH-YunG3mYoi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