[libc-commits] [libc] 1bb6f1b - [libc][docs] Move links to internal developer guides out of the main side bar.

Siva Chandra Reddy via libc-commits libc-commits at lists.llvm.org
Sat Nov 5 00:05:49 PDT 2022


Author: Siva Chandra Reddy
Date: 2022-11-05T00:04:50-07:00
New Revision: 1bb6f1bb8f40181977516ec5b81a7bec25d312a2

URL: https://github.com/llvm/llvm-project/commit/1bb6f1bb8f40181977516ec5b81a7bec25d312a2
DIFF: https://github.com/llvm/llvm-project/commit/1bb6f1bb8f40181977516ec5b81a7bec25d312a2.diff

LOG: [libc][docs] Move links to internal developer guides out of the main side bar.

The links are all now from a "Developer Guides" page which is linked from the
main side bar.

Added: 
    libc/docs/cmake_build_rules.rst
    libc/docs/code_style.rst
    libc/docs/developer_guides.rst
    libc/docs/source_tree_layout.rst

Modified: 
    libc/docs/api_test.rst
    libc/docs/clang_tidy_checks.rst
    libc/docs/contributing.rst
    libc/docs/index.rst
    libc/docs/overlay_mode.rst

Removed: 
    libc/docs/build_system.rst
    libc/docs/source_layout.rst


################################################################################
diff  --git a/libc/docs/api_test.rst b/libc/docs/api_test.rst
index b63adb3e64574..e39d506c3a92f 100644
--- a/libc/docs/api_test.rst
+++ b/libc/docs/api_test.rst
@@ -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

diff  --git a/libc/docs/clang_tidy_checks.rst b/libc/docs/clang_tidy_checks.rst
index b0e72cd011d4b..67ab5fc65c902 100644
--- a/libc/docs/clang_tidy_checks.rst
+++ b/libc/docs/clang_tidy_checks.rst
@@ -1,4 +1,4 @@
-.. _clangtidy_rules:
+.. _clang_tidy_checks:
 
 LLVM libc clang-tidy checks
 ===========================

diff  --git a/libc/docs/build_system.rst b/libc/docs/cmake_build_rules.rst
similarity index 91%
rename from libc/docs/build_system.rst
rename to libc/docs/cmake_build_rules.rst
index b55f92a2e7bfc..dfa9f7a6d7d41 100644
--- a/libc/docs/build_system.rst
+++ b/libc/docs/cmake_build_rules.rst
@@ -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
index 0000000000000..9efacc4bbece3
--- /dev/null
+++ b/libc/docs/code_style.rst
@@ -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 
diff ers from that standard with respect to the naming style. The
+
diff erences 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.

diff  --git a/libc/docs/contributing.rst b/libc/docs/contributing.rst
index e17243df7bc69..65ba9a4079704 100644
--- a/libc/docs/contributing.rst
+++ b/libc/docs/contributing.rst
@@ -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
index 0000000000000..e7e05e1cc0348
--- /dev/null
+++ b/libc/docs/developer_guides.rst
@@ -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

diff  --git a/libc/docs/index.rst b/libc/docs/index.rst
index c72544cdcc99b..e99ebafe274ef 100644
--- a/libc/docs/index.rst
+++ b/libc/docs/index.rst
@@ -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
 

diff  --git a/libc/docs/overlay_mode.rst b/libc/docs/overlay_mode.rst
index 4c5eaf939487c..0039e67f6384e 100644
--- a/libc/docs/overlay_mode.rst
+++ b/libc/docs/overlay_mode.rst
@@ -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

diff  --git a/libc/docs/source_layout.rst b/libc/docs/source_tree_layout.rst
similarity index 98%
rename from libc/docs/source_layout.rst
rename to libc/docs/source_tree_layout.rst
index 960a060d9b7b7..a0565cb713080 100644
--- a/libc/docs/source_layout.rst
+++ b/libc/docs/source_tree_layout.rst
@@ -1,3 +1,6 @@
+.. _source_tree_layout:
+
+============================
 LLVM-libc Source Tree Layout
 ============================
 


        


More information about the libc-commits mailing list