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 18Each of these directories is explained in detail below. 19 20The ``cmake`` directory 21----------------------- 22 23The ``cmake`` directory contains the implementations of LLVM-libc's CMake build 24rules. 25 26The ``docs`` directory 27---------------------- 28 29The ``docs`` directory contains design docs and also informative documents like 30this document on source layout. 31 32The ``fuzzing`` directory 33------------------------- 34 35This directory contains fuzzing tests for the various components of llvm-libc. The 36directory structure within this directory mirrors the directory structure of the 37top-level ``libc`` directory itself. For more details, see :doc:`fuzzing`. 38 39The ``include`` directory 40------------------------- 41 42The ``include`` directory contains: 43 441. Self contained public header files - These are header files which are 45 already in the form that get installed when LLVM-libc is installed on a user's 46 computer. 472. ``*.h.def`` and ``*.h.in`` files - These files are used to construct the 48 generated public header files. 493. A ``CMakeLists.txt`` file - This file lists the targets for the self 50 contained and generated public header files. 51 52The ``lib`` directory 53--------------------- 54 55This directory contains a ``CMakeLists.txt`` file listing the targets for the 56public libraries ``libc.a``, ``libm.a`` etc. 57 58The ``loader`` directory 59------------------------ 60 61This directory contains the implementations of the application loaders like 62``crt1.o`` etc. 63 64The ``src`` directory 65--------------------- 66 67This directory contains the implementations of the llvm-libc entrypoints. It is 68further organized as follows: 69 701. There is a top-level CMakeLists.txt file. 712. For every public header file provided by llvm-libc, there exists a 72 corresponding directory in the ``src`` directory. The name of the directory 73 is same as the base name of the header file. For example, the directory 74 corresponding to the public ``math.h`` header file is named ``math``. The 75 implementation standard document explains more about the *header* 76 directories. 77 78The ``test`` directory 79---------------------- 80 81This directory contains tests for the various components of llvm-libc. The 82directory structure within this directory mirrors the directory structure of the 83toplevel ``libc`` directory itself. A test for, say the ``mmap`` function, lives 84in the directory ``test/src/sys/mman/`` as implementation of ``mmap`` lives in 85``src/sys/mman``. 86 87The ``utils`` directory 88----------------------- 89 90This directory contains utilities used by other parts of the llvm-libc system. 91See the `README` files, in the sub-directories within this directory, to learn 92about the various utilities. 93