Siva Chandra | 4380647 | 2019-10-04 17:30:54 +0000 | [diff] [blame^] | 1 | LLVM libc build rules |
| 2 | ===================== |
| 3 | |
| 4 | At the cost of verbosity, we want to keep the build system of LLVM libc |
| 5 | as simple as possible. We also want to be highly modular with our build |
| 6 | targets. This makes picking and choosing desired pieces a straighforward |
| 7 | task. |
| 8 | |
| 9 | Targets for entrypoints |
| 10 | ----------------------- |
| 11 | |
| 12 | Every entrypoint in LLVM-libc has its own build target. This target is listed |
| 13 | using the ``add_entrypoint_object`` rule. This rule generates a single object |
| 14 | file containing the implementation of the entrypoint. |
| 15 | |
| 16 | Targets for entrypoint libraries |
| 17 | -------------------------------- |
| 18 | |
| 19 | Standards like POSIX require that a libc provide certain library files like |
| 20 | ``libc.a``, ``libm.a``, etc. The targets for such library files are listed in |
| 21 | the ``lib`` directory as ``add_entrypoint_library`` targets. An |
| 22 | ``add_entrypoint_library`` target takes a list of ``add_entrypoint_object`` |
| 23 | targets and produces a static library containing the object files corresponding |
| 24 | to the ``add_entrypoint_targets``. |