[libc] Build two different static archives libc.a and libm.a under full build.
authorSiva Chandra Reddy <sivachandra@google.com>
Tue, 31 Jan 2023 05:31:18 +0000 (05:31 +0000)
committerSiva Chandra Reddy <sivachandra@google.com>
Tue, 31 Jan 2023 21:45:08 +0000 (21:45 +0000)
commitb875defc55bd4c2f3fc0572c84aead61c2a48d27
tree2c24d756649f42bb43f52b03ac8b1fee0c167662
parent3cd96a7309f67ab3b91ddcbd7e6d2ba9b714aba7
[libc] Build two different static archives libc.a and libm.a under full build.

We currently put everything in one single archive libc.a which breaks in
certain situations where the compiler drivers expect libm.a also. With
this change, we separate out libc.a and libm.a functions as is done
conventionally and put them in two different static archives.

One will now have to build two targets, `libc` and `libm` which produce
`libc.a` and `libm.a` respectively. Under default build, one still builds only
one target named `libc` which produces `libllvmlibc.a`.

Reviewed By: jhuber6

Differential Revision: https://reviews.llvm.org/D143005
libc/CMakeLists.txt
libc/lib/CMakeLists.txt
libc/startup/linux/CMakeLists.txt