llvm-project/libc/cmake/modules
Joseph Huber 55151e138d [libc] Add initial support for a libc implementation for the GPU
This patch contains the initial support for building LLVM's libc as a
target for the GPU. Currently this only supports a handful of very basic
functions that can be implemented without an operating system. The GPU
code is build using the existing OpenMP toolchain. This allows us to
minimally change the existing codebase and get a functioning static
library. This patch allows users to create a static library called
`libcgpu.a` that contains fat binaries containing device IR.

Current limitations are the lack of test support and the fact that only
one target OS can be built at a time. That is, the user cannot get a
`libc` for Linux and one for the GPU simultaneously.

This introduces two new CMake variables to control the behavior
`LLVM_LIBC_TARET_OS` is exported so the user can now specify it to equal
`"gpu"`. `LLVM_LIBC_GPU_ARCHITECTURES` is also used to configure how
many targets to build for at once.

Depends on D138607

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D138608
2022-11-29 14:51:54 -06:00
..
cpu_features [libc][NFC] Use a end of list marker for cpu feature detection. 2021-01-27 01:24:15 -08:00
LLVMLibCArchitectures.cmake [libc] Add initial support for a libc implementation for the GPU 2022-11-29 14:51:54 -06:00
LLVMLibCCheckCpuFeatures.cmake [libc][reland] Fix builtin definition for memory functions 2022-11-18 14:25:23 -08:00
LLVMLibCCheckMPFR.cmake [libc] Enable MPFR library for math functions test 2021-07-27 20:40:04 +00:00
LLVMLibCFlagRules.cmake [libc] Add float type and flag for nearest_integer to enable SSE4.2. 2022-07-22 09:29:41 -04:00
LLVMLibCHeaderRules.cmake [libc] Add a target to install libc in the full build mode. 2022-08-17 22:49:02 +00:00
LLVMLibCLibraryRules.cmake [libc][Obvious] Do not add __NO_ to targets with FLAG__NO suffix. 2022-06-30 10:45:59 -04:00
LLVMLibCObjectRules.cmake [libc] Add initial support for a libc implementation for the GPU 2022-11-29 14:51:54 -06:00
LLVMLibCRules.cmake [libc] Add a target to install libc in the full build mode. 2022-08-17 22:49:02 +00:00
LLVMLibCTargetNameUtils.cmake [libc] Add fully-qualified target names. 2020-04-10 18:01:52 -07:00
LLVMLibCTestRules.cmake [libc] Convert the api-test in to an integration test. 2022-11-04 07:09:18 +00:00