Illustrate a redirector using the example of round function from math.h.
authorSiva Chandra Reddy <sivachandra@google.com>
Tue, 15 Oct 2019 20:25:36 +0000 (13:25 -0700)
committerSiva Chandra Reddy <sivachandra@google.com>
Fri, 1 Nov 2019 18:06:12 +0000 (11:06 -0700)
commit9364107cf348c7d4a2d05b8906bda6ba384ce6f6
tree6e9b56d55d882f360a19eb927be5af4e1998640e
parent9b0dfdf5e1939b4129df75cc8e8d57fcf451b786
Illustrate a redirector using the example of round function from math.h.

Setup demonstrated in this patch is only for ELF-ish platforms.

Also note:

1. Use of redirectors is a temporary scheme. They will be removed once
   LLVM-libc has implementations for the redirected functions.
2. Redirectors are optional. One can choose to not include them in the
   LLVM-libc build for their platform.
3. Even with redirectors used, we want to link to the system libc
   dynamically.

Reviewers: dlj, hfinkel, jakehehrlich, phosek, stanshebs, theraven, alexshap

Subscribers: mgorny, libc-commits

Tags: #libc-project

Differential Revision: https://reviews.llvm.org/D69020
libc/cmake/modules/LLVMLibCRules.cmake
libc/docs/build_system.rst
libc/docs/redirectors.rst [new file with mode: 0644]
libc/docs/redirectors_schematic.svg [new file with mode: 0644]
libc/lib/CMakeLists.txt
libc/src/CMakeLists.txt
libc/src/math/CMakeLists.txt [new file with mode: 0644]
libc/src/math/round/CMakeLists.txt [new file with mode: 0644]
libc/src/math/round/round.cpp [new file with mode: 0644]
libc/src/math/round/round.h [new file with mode: 0644]
libc/src/math/round/round_redirector.cpp [new file with mode: 0644]