summaryrefslogtreecommitdiffstats
path: root/libc/lib
diff options
context:
space:
mode:
authorSiva Chandra Reddy <sivachandra@google.com>2019-10-15 13:25:36 -0700
committerSiva Chandra Reddy <sivachandra@google.com>2019-11-01 11:06:12 -0700
commit9364107cf348c7d4a2d05b8906bda6ba384ce6f6 (patch)
tree6e9b56d55d882f360a19eb927be5af4e1998640e /libc/lib
parent9b0dfdf5e1939b4129df75cc8e8d57fcf451b786 (diff)
downloadbcm5719-llvm-9364107cf348c7d4a2d05b8906bda6ba384ce6f6.tar.gz
bcm5719-llvm-9364107cf348c7d4a2d05b8906bda6ba384ce6f6.zip
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
Diffstat (limited to 'libc/lib')
-rw-r--r--libc/lib/CMakeLists.txt15
1 files changed, 14 insertions, 1 deletions
diff --git a/libc/lib/CMakeLists.txt b/libc/lib/CMakeLists.txt
index 49e2d2f10d7..121cd1fbb77 100644
--- a/libc/lib/CMakeLists.txt
+++ b/libc/lib/CMakeLists.txt
@@ -2,8 +2,21 @@
add_entrypoint_library(
llvmlibc
DEPENDS
- ### C standard library entrypoints
# string.h entrypoints
+ ## C standard library entrypoints
strcpy
strcat
)
+
+add_entrypoint_library(
+ llvmlibm
+ DEPENDS
+ # math.h entrypoints
+ round
+)
+
+add_redirector_library(
+ llvmlibc_redirectors
+ DEPENDS
+ round_redirector
+)
OpenPOWER on IntegriCloud