[libc][docs] Move links to internal developer guides out of the main side bar.
authorSiva Chandra Reddy <sivachandra@google.com>
Fri, 4 Nov 2022 19:53:24 +0000 (12:53 -0700)
committerSiva Chandra Reddy <sivachandra@google.com>
Sat, 5 Nov 2022 07:04:50 +0000 (00:04 -0700)
The links are all now from a "Developer Guides" page which is linked from the
main side bar.

libc/docs/api_test.rst
libc/docs/clang_tidy_checks.rst
libc/docs/cmake_build_rules.rst [moved from libc/docs/build_system.rst with 91% similarity]
libc/docs/code_style.rst [new file with mode: 0644]
libc/docs/contributing.rst
libc/docs/developer_guides.rst [new file with mode: 0644]
libc/docs/index.rst
libc/docs/overlay_mode.rst
libc/docs/source_tree_layout.rst [moved from libc/docs/source_layout.rst with 98% similarity]

index b63adb3..e39d506 100644 (file)
@@ -1,5 +1,8 @@
+.. _api_test:
+
+========
 API Test
-=====================
+========
 The implementation of libc-project is unique because our public C header files
 are generated using information from ground truth captured in TableGen files.
 Unit tests only exercise the internal C++ implementations and don't ensure the
index b0e72cd..67ab5fc 100644 (file)
@@ -1,4 +1,4 @@
-.. _clangtidy_rules:
+.. _clang_tidy_checks:
 
 LLVM libc clang-tidy checks
 ===========================
similarity index 91%
rename from libc/docs/build_system.rst
rename to libc/docs/cmake_build_rules.rst
index b55f92a..dfa9f7a 100644 (file)
@@ -1,5 +1,8 @@
-LLVM libc build rules
-=====================
+.. _cmake_build_rules:
+
+===========================
+The libc CMake build system
+===========================
 
 At the cost of verbosity, we want to keep the build system of LLVM libc
 as simple as possible. We also want to be highly modular with our build
diff --git a/libc/docs/code_style.rst b/libc/docs/code_style.rst
new file mode 100644 (file)
index 0000000..9efacc4
--- /dev/null
@@ -0,0 +1,22 @@
+.. _code_style:
+
+===================
+The libc code style
+===================
+
+For the large part, the libc project follows the general `coding standards of
+the LLVM project <https://llvm.org/docs/CodingStandards.html>`_. The libc
+project differs from that standard with respect to the naming style. The
+differences are as follows:
+
+#. **Non-const variables** - This includes function arguments, struct and
+   class data members, non-const globals and local variables. They all use the
+   ``snake_case`` style.
+#. **const and constexpr variables** - They use the capitlized
+   ``SNAKE_CASE`` irrespective of whether they are local or global.
+#. **Function and methods** - They use the ``snake_case`` style like the
+   non-const variables.
+#. **Internal type names** - These are types which are interal to the libc
+   implementation. They use the `CaptilizedCamelCase` style.
+#. **Public names** - These are the names as prescribed by the standards and
+   will follow the style as prescribed by the standards.
index e17243d..65ba9a4 100644 (file)
@@ -42,7 +42,7 @@ a list of open projects that one can start with:
    to a fast random number generator with a large range.
 
 #. **Update the clang-tidy lint rules and use them in the build and/or CI** -
-   Currently, the :ref:`clangtidy_rules` have gone stale and are mostly unused
+   Currently, the :ref:`clang_tidy_checks` have gone stale and are mostly unused
    by the developers and on the CI builders. This project is about updating
    them and reintegrating them back with the build and running them on the
    CI builders.
diff --git a/libc/docs/developer_guides.rst b/libc/docs/developer_guides.rst
new file mode 100644 (file)
index 0000000..e7e05e1
--- /dev/null
@@ -0,0 +1,21 @@
+.. _developer_guides:
+
+================
+Developer Guides
+================
+
+Navigate to the links below for information on the respective topics:
+
+.. toctree::
+
+   code_style
+   source_tree_layout
+   entrypoints
+   cmake_build_rules
+   clang_tidy_checks
+   fuzzing
+   ground_truth_specification
+   header_generation
+   implementation_standard
+   api_test
+   mechanics_of_public_api
index c72544c..e99ebaf 100644 (file)
@@ -68,16 +68,7 @@ stages there is no ABI stability in any form.
    :maxdepth: 1
    :caption: Development
 
-   build_system
-   clang_tidy_checks
-   entrypoints
-   fuzzing
-   ground_truth_specification
-   header_generation
-   implementation_standard
-   api_test
-   mechanics_of_public_api
-   source_layout
+   developer_guides
    porting
    contributing
 
index 4c5eaf9..0039e67 100644 (file)
@@ -59,14 +59,14 @@ can follow up the build step with an install step:
 
   $> ninja install-llvmlibc
 
-Building the static archive as part of the runtimes build
----------------------------------------------------------
+Building the static archive as part of the bootstrap build
+----------------------------------------------------------
 
-The runtimes build is a build mode in which runtime components like libc++,
+The bootstrap build is a build mode in which runtime components like libc++,
 libcxx-abi, libc etc. are built using the ToT clang. The idea is that this build
 produces an in-sync toolchain of compiler + runtime libraries. Such a synchrony
 is not essential for the libc but can one still build the overlay static archive
-as part of the runtimes build if one wants to. The first step is to configure
+as part of the bootstrap build if one wants to. The first step is to configure
 appropriately:
 
 .. code-block:: sh
similarity index 98%
rename from libc/docs/source_layout.rst
rename to libc/docs/source_tree_layout.rst
index 960a060..a0565cb 100644 (file)
@@ -1,3 +1,6 @@
+.. _source_tree_layout:
+
+============================
 LLVM-libc Source Tree Layout
 ============================