[libc++] Add a CMake target to re-generate files and revamp CONTRIBUTING.rst

As we automate more and more things in the library, it becomes useful for
contributors to have a single target for running all the automation as
part of their workflow. This commit adds a new `libcxx-generate-files`
target that should re-generate all the auto-generated files in the library.

As a fly-by, I also revamped the documentation on Contributing to account
for this new target and present it as a bullet list of things to check
before committing. I also added a few things that are often overlooked
to that list, such as updating the synopsis and the status files.

Differential Revision: https://reviews.llvm.org/D106067

NOKEYCHECK=True
GitOrigin-RevId: 1f8e286cdc14488c80eeb4a92ff791510d19a0d3
diff --git a/docs/Contributing.rst b/docs/Contributing.rst
index 6bad6a6..0cf752f 100644
--- a/docs/Contributing.rst
+++ b/docs/Contributing.rst
@@ -4,15 +4,13 @@
 Contributing to libc++
 ======================
 
-.. contents::
-  :local:
+This file contains notes about various tasks and processes specific to contributing
+to libc++. If this is your first time contributing, please also read `this document
+<https://www.llvm.org/docs/Contributing.html>`__ on general rules for contributing to LLVM.
 
-Please read `this document <https://www.llvm.org/docs/Contributing.html>`__ on general rules to contribute to LLVM projects.
-
-Tasks and processes
-===================
-
-This file contains notes about various tasks and processes specific to libc++.
+For libc++, please make sure you follow `these instructions <https://www.llvm.org/docs/Phabricator.html#requesting-a-review-via-the-command-line>`_
+for submitting a code review from the command-line using ``arc``, since we have some
+automation (e.g. CI) that depends on the review being submitted that way.
 
 Looking for pre-existing reviews
 ================================
@@ -24,8 +22,27 @@
 that your feature is already being worked on, please consider chiming in instead
 of duplicating work!
 
-Post-Release TODO
-=================
+Pre-commit check list
+=====================
+
+Before committing or creating a review, please go through this check-list to make
+sure you don't forget anything:
+
+- Do you have tests for every public class and/or function you're adding or modifying?
+- Did you update the synopsis of the relevant headers?
+- Did you update the relevant files to track implementation status (in ``docs/Status/``)?
+- If you added a header:
+
+  - Did you add it to ``include/module.modulemap``?
+  - Did you add it to ``include/CMakeLists.txt``?
+  - If it's a public header, did you add a test under ``test/libcxx`` that the new header defines ``_LIBCPP_VERSION``? See ``test/libcxx/algorithms/version.pass.cpp`` for an example. NOTE: This should be automated.
+  - If it's a public header, did you update ``utils/generate_header_inclusion_tests.py``?
+
+- Did you add the relevant feature test macro(s) for your feature? Did you update the ``generate_feature_test_macro_components.py`` script with it?
+- Did you run the ``libcxx-generate-files`` target and verify its output?
+
+Post-release check list
+=======================
 
 After branching for an LLVM release:
 
@@ -33,28 +50,6 @@
 2. Update the ``include/__libcpp_version`` file
 3. Update the version number in ``docs/conf.py``
 
-Modifying feature-test macros
-=============================
-
-When adding or updating feature-test macros, you should update the corresponding tests.
-To do that, modify ``feature_test_macros`` table in the script
-``utils/generate_feature_test_macro_components.py``, run it, and commit updated
-files. Running ``utils/generate_feature_test_macro_components.py`` should never
-generate diffs in a clean checkout; feel free to run it in your local checkout
-any time you want.
-
-
-Adding a new header TODO
-========================
-
-When adding a new header to libc++:
-
-1. Add a test under ``test/libcxx`` that the new header defines ``_LIBCPP_VERSION``. See ``test/libcxx/algorithms/version.pass.cpp`` for an example.
-2. Run ``python utils/generate_header_tests.py``; verify and commit the changes.
-3. Modify ``python utils/generate_header_inclusion_tests.py``; run it; verify and commit the changes.
-4. Create a submodule in ``include/module.modulemap`` for the new header.
-5. Update the ``include/CMakeLists.txt`` file to include the new header.
-
 Exporting new symbols from the library
 ======================================