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 - include 11 - lib 12 - loader 13 - src 14 - test 15 + utils 16 - build_scripts 17 - testing 18 - www 19 20Each of these directories is explained in detail below. 21 22The ``cmake`` directory 23----------------------- 24 25The ``cmake`` directory contains the implementations of LLVM-libc's CMake build 26rules. 27 28The ``docs`` directory 29---------------------- 30 31The ``docs`` directory contains design docs and also informative documents like 32this document on source layout. 33 34The ``include`` directory 35------------------------- 36 37The ``include`` directory contains: 38 391. Self contained public header files - These are header files which are 40 already in the form that get installed when LLVM-libc is installed on a user's 41 computer. 422. ``*.h.def`` and ``*.h.in`` files - These files are used to construct the 43 generated public header files. 443. A ``CMakeLists.txt`` file - This file lists the targets for the self 45 contained and generated public header files. 46 47The ``lib`` directory 48--------------------- 49 50This directory contains a ``CMakeLists.txt`` file listing the targets for the 51public libraries ``libc.a``, ``libm.a`` etc. 52 53The ``loader`` directory 54------------------------ 55 56This directory contains the implementations of the application loaders like 57``crt1.o`` etc. 58 59The ``src`` directory 60--------------------- 61 62This directory contains the implementations of the llvm-libc entrypoints. It is 63further organized as follows: 64 651. There is a toplevel CMakeLists.txt file. 662. For every public header file provided by llvm-libc, there exists a 67 corresponding directory in the ``src`` directory. The name of the directory 68 is same as the base name of the header file. For example, the directory 69 corresponding to the public ``math.h`` header file is named ``math``. The 70 implementation standard document explains more about the *header* 71 directories. 72 73The ``test`` directory 74---------------------- 75 76This directory contains tests for the various components of llvm-libc. The 77directory structure within this directory mirrors the directory structure of the 78toplevel ``libc`` directory itself. A test for, say the ``mmap`` function, lives 79in the directory ``test/src/sys/mman/`` as implementation of ``mmap`` lives in 80``src/sys/mman``. 81 82The ``www`` directory 83--------------------- 84 85The ``www`` directory contains the HTML content of libc.llvm.org 86 87The ``utils/build_scripts`` directory 88------------------------------------- 89 90This directory contains scripts which support the build system, tooling etc. 91 92The ``utils/testing`` directory 93------------------------------- 94 95This directory contains testing infrastructure. 96