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

    <tr>
        <th>Summary</th>
        <td>
            [C++20] [Modules] Backport ClangScanDeps patches to 16.x
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang:modules,
            release:backport
      </td>
    </tr>

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

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

<pre>
    See https://discourse.llvm.org/t/land-c-modules-changes-required-for-cmake-before-llvm-16-branch/67717 for the background.

Simply, these patches are necessary to support cmake to work with C++20 Modules. And C++20 Modules is a pretty important feature that a lot of people want to try it as soon as possible. So we want to back port the features to 16.x to make the user easier to try it.

These patches only affect ClangScanDeps and it wouldn't affect clang.  So there is no risk to affect normal users. And we've already tested these patches  for about 2 months by a patched clang (https://github.com/mathstuf/llvm-project/tree/p1689r5-csd).
So the risk is pretty low.

/cherry-pick 6470706bc0ed de17c665e3f9  591fdcde9213 35537aea1228 e1354763b6e6
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx8VE2zoygU_TW4uaWFqBgXLvJR2c3qzWK2CNfIBMEG7Iz_fgqT16_Sr6o3oQJHzj3nnosIQd8sYk-aE2kumVjj5Hx_nlZhf-h_1i4bnNr6D0SYYlwCqY6EXQm7Kh2kW33Awpifc-H8jbBrJOxqhFW5zGenVoMhl5OwNwy5xx-r9qjy0flczuKO-YCj85in7_OS54MXVk6EXXnbli2MzkOcEAYh7zfvVqsKQi-EHp-_H3pezEbYOYECwiKinDCA8AgWJYYg_AbRQViXxfkIO2faeDh_h4eOE5wJOxF2YhT-elZbwNGq79ugAwhYPMa4gZ7TdcJGGFHE1SPESUQQYFwEN8KCbjEIj4SIDqLfQEcQAYJzNq2LC0EPBgv4cPD4QiahsJeaZL8uD-mk5MV_aX0qmBDWgB5QBI3-i-PNnr_fTHHWbCDGEWWEsxH29iGFveASQFiVynu41ShLWBs_YTLBCkg1xgk9Jg-sA6_DPVG-UNb5WZi9npd5DySs_YkgjEehNogYIqrfmrQ3VwxujcBgdjZOAYYtebwD1JMdCDu8h-6m47QOhXQzYddZxCnEdUyZSxFavPsXZYpg9IiEXZeSHzrf5DIowrqXPU89Tx06fDbVuMebfYRd5YTeb_mi5R143dKW8kFSVKCwbCXnDVZjB9B05aikwo6VFVRNU7UCRcnYAbCsmrrl1cCRZ6qvVFd1IsO-5C2ntGvrNpt6yoWkh66UtMRukNi03WFsWUv5oa6bcsx0zyirKCsp5WVTt0U3dtVYj_WB1nU5ck5qirPQ5tccZjqEFXtOeUMzIwY0YZ9uxnZXSXV8zSZhjLAzYcyjQRGQVMeUwRTBdNRcMt_vzg7rLZCaGh1i-KKJOpr93fg1L6S5AGlOr6lJ_06v-35L3WcOXtnOVm_6P3Q6UX7v8i4zpPciKf0_AAD__6nYkFU">