brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 2248ff4 Raw
32 lines · plain
1.. _cmake_build_rules:2 3===========================4The libc CMake build system5===========================6 7At the cost of verbosity, we want to keep the build system of LLVM libc8as simple as possible. We also want to be highly modular with our build9targets. This makes picking and choosing desired pieces a straightforward10task.11 12Targets for entrypoints13-----------------------14 15Every entrypoint in LLVM-libc has its own build target. This target is listed16using the ``add_entrypoint_object`` rule. This rule generates a single object17file containing the implementation of the entrypoint.18 19Targets for redirecting entrypoints are also listed using the20``add_entrypoint_object`` rule. However, one will have to additionally specify21the ``REDIRECTED`` option with the rule.22 23Targets for entrypoint libraries24--------------------------------25 26Standards like POSIX require that a libc provide certain library files like27``libc.a``, ``libm.a``, etc. The targets for such library files are listed in28the ``lib`` directory as ``add_entrypoint_library`` targets. An29``add_entrypoint_library`` target  takes a list of ``add_entrypoint_object``30targets and produces a static library containing the object files corresponding31to the ``add_entrypoint_targets``.32