blob: f34ffe054b4f7ac474d95dfc0d0ba819342be423 [file] [log] [blame]
Siva Chandra43806472019-10-04 17:30:54 +00001LLVM libc build rules
2=====================
3
4At the cost of verbosity, we want to keep the build system of LLVM libc
5as simple as possible. We also want to be highly modular with our build
6targets. This makes picking and choosing desired pieces a straighforward
7task.
8
9Targets for entrypoints
10-----------------------
11
12Every entrypoint in LLVM-libc has its own build target. This target is listed
13using the ``add_entrypoint_object`` rule. This rule generates a single object
14file containing the implementation of the entrypoint.
15
16Targets for entrypoint libraries
17--------------------------------
18
19Standards 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
21the ``lib`` directory as ``add_entrypoint_library`` targets. An
22``add_entrypoint_library`` target takes a list of ``add_entrypoint_object``
23targets and produces a static library containing the object files corresponding
24to the ``add_entrypoint_targets``.