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

    <tr>
        <th>Summary</th>
        <td>
            [libc++] Rename %{module} substitution to %{modules-dir}
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            libc++
      </td>
    </tr>

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

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

<pre>
    We should rename `%{module}` to `%{modules-dir}`. In fact the other variables might need a renaming too:

```diff
diff --git a/libcxx/test/configs/cmake-bridge.cfg.in b/libcxx/test/configs/cmake-bridge.cfg.in
index 0e3c3040c964..93a7a9bb8129 100644
--- a/libcxx/test/configs/cmake-bridge.cfg.in
+++ b/libcxx/test/configs/cmake-bridge.cfg.in
@@ -25,12 +25,12 @@ config.test_exec_root = os.path.join('@CMAKE_BINARY_DIR@', 'test')
 # Add substitutions for bootstrapping the test suite configuration
 import shlex
 config.substitutions.append(('%{cxx}', shlex.quote('@CMAKE_CXX_COMPILER@')))
-config.substitutions.append(('%{libcxx}', '@LIBCXX_SOURCE_DIR@'))
-config.substitutions.append(('%{include}', '@LIBCXX_GENERATED_INCLUDE_DIR@'))
-config.substitutions.append(('%{target-include}', '@LIBCXX_GENERATED_INCLUDE_TARGET_DIR@'))
-config.substitutions.append(('%{lib}', '@LIBCXX_LIBRARY_DIR@'))
-config.substitutions.append(('%{module}', '@LIBCXX_GENERATED_MODULE_DIR@'))
-config.substitutions.append(('%{test-tools}', '@LIBCXX_TEST_TOOLS_PATH@'))
+config.substitutions.append(('%{libcxx-dir}', '@LIBCXX_SOURCE_DIR@'))
+config.substitutions.append(('%{include-dir}', '@LIBCXX_GENERATED_INCLUDE_DIR@'))
+config.substitutions.append(('%{target-include-dir}', '@LIBCXX_GENERATED_INCLUDE_TARGET_DIR@'))
+config.substitutions.append(('%{lib-dir}', '@LIBCXX_LIBRARY_DIR@'))
+config.substitutions.append(('%{modules-dir}', '@LIBCXX_GENERATED_MODULE_DIR@'))
+config.substitutions.append(('%{test-tools-dir}', '@LIBCXX_TEST_TOOLS_PATH@'))
 
 # The test needs to manually rebuild the module. The compiler flags used in the
 # test need to be the same as the compiler flags used to generate the module.
```

This would make this a lot easier to read IMO.

_Originally posted by @ldionne in https://github.com/llvm/llvm-project/pull/76246#discussion_r1446372009_

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJysll9z2jgXxj-NuDmDR5aNjS-44G9f5iWlQ8ls94qRrYOtrrBYSe4m335HNklJtmHrdGc8IGzp-Z1zfJAebq0sa8QJGc3IaDHgjau0mSghdV3jINficfIbgq10owQYrPkJgSSUsBFJZyctGoUkXZCEgtOvH9ihkKZ7GsC6hiMvHLgKQbsKDXzjRvJcoYWTLCsHNaIA3kFkXYLTmkRTQheEPn0mtLuEPB67W34Ew2EpHXDCVkrmxcMDYSuH1hG2KnR9lKX1oxP_A4e5kaLEoDiWgawh77uiY8pa4ANQjIqIxrTIkjgIsoinPMvzccgyCClN4ribPBwO-0d2SZfNuuu9gZKYkpjCkI0Im4cMCJs9D7tHnUjgJQ_4gMXBaO2ARAvQNjhzVwVftawJGxOWkpjO76b_Xx5m64_T3e-HxXrnVVhK2BwIS7u4UsKyjg6ERTAVAmyTWydd46SuLRy1gVxrZ53h53P7oisEvxhsIx1eYmoM9_MvUvJ01saBrRQ-XG5dQn8hHvDzGWvRxtuG3HajL1u6uATaSgR_Ntrhq7TmX74c5tu7T-vN8jmx7HJ1r_LnkZeX9UztOJv1zEM-b-938-V1_d7FkHWhGoFvQD4sPy530_1ycVh_nG_uF7_Oc9yU6IZ9sfvp7sNy_8t0JfM3kJv1bPeqH99F-L6b3czrbru43_wH1UTrhk5rZd8g7pef94f9drv5fPg03f_vnzDCZn0b8mlD7tmUvUiX_riB-snW7EV92Zy94LcatG-Nb4BvtmkvzqvT9d3d2q_Az_16g_uvPQtXR8P-adv3B7_1_u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