• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1LLVM-libc Source Tree Layout
2============================
3
4At the top-level, LLVM-libc source tree is organized in to the following
5directories::
6
7   + libc
8        - cmake
9        - docs
10        - fuzzing
11        - include
12        - lib
13        - loader
14        - src
15        - test
16        - utils
17        - www
18
19Each of these directories is explained in detail below.
20
21The ``cmake`` directory
22-----------------------
23
24The ``cmake`` directory contains the implementations of LLVM-libc's CMake build
25rules.
26
27The ``docs`` directory
28----------------------
29
30The ``docs`` directory contains design docs and also informative documents like
31this document on source layout.
32
33The ``fuzzing`` directory
34----------------------
35
36This directory contains fuzzing tests for the various components of llvm-libc. The
37directory structure within this directory mirrors the directory structure of the
38top-level ``libc`` directory itself. For more details, see :doc:`fuzzing`.
39
40The ``include`` directory
41-------------------------
42
43The ``include`` directory contains:
44
451. Self contained public header files - These are header files which are
46   already in the form that get installed when LLVM-libc is installed on a user's
47   computer.
482. ``*.h.def`` and ``*.h.in`` files - These files are used to construct the
49   generated public header files.
503. A ``CMakeLists.txt`` file - This file lists the targets for the self
51   contained and generated public header files.
52
53The ``lib`` directory
54---------------------
55
56This directory contains a ``CMakeLists.txt`` file listing the targets for the
57public libraries ``libc.a``, ``libm.a`` etc.
58
59The ``loader`` directory
60------------------------
61
62This directory contains the implementations of the application loaders like
63``crt1.o`` etc.
64
65The ``src`` directory
66---------------------
67
68This directory contains the implementations of the llvm-libc entrypoints. It is
69further organized as follows:
70
711. There is a top-level CMakeLists.txt file.
722. For every public header file provided by llvm-libc, there exists a
73   corresponding directory in the ``src`` directory. The name of the directory
74   is same as the base name of the header file. For example, the directory
75   corresponding to the public ``math.h`` header file is named ``math``. The
76   implementation standard document explains more about the *header*
77   directories.
78
79The ``test`` directory
80----------------------
81
82This directory contains tests for the various components of llvm-libc. The
83directory structure within this directory mirrors the directory structure of the
84toplevel ``libc`` directory itself. A test for, say the ``mmap`` function, lives
85in the directory ``test/src/sys/mman/`` as implementation of ``mmap`` lives in
86``src/sys/mman``.
87
88The `utils` directory
89---------------------
90
91This directory contains utilities used by other parts of the llvm-libc system.
92See the `README` files, in the sub-directories within this directory, to learn
93about the various utilities.
94
95The ``www`` directory
96---------------------
97
98The ``www`` directory contains the HTML content of libc.llvm.org
99
100