[libc-commits] [PATCH] D144214: [libc] Support add_object_library for the GPU build

Joseph Huber via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Feb 16 12:50:15 PST 2023


jhuber6 created this revision.
jhuber6 added reviewers: sivachandra, michaelrj, lntue.
Herald added subscribers: libc-commits, kosarev, mattd, asavonic, ecnelises, kerbowa, tschuett, jvesely.
Herald added projects: libc-project, All.
jhuber6 requested review of this revision.

This patch unifies the handling of generating the GPU build targets
between the `add_entrypoint_library` and the `add_object_library`
functions. The `_build_gpu_objects` function will create two targets.
One contains a single object file with several GPU binaries embedded in
it, a so-called fatbinary. The other is a direct compile of the
supported target to be used internally only. This patch pulls out some
of the properties logic so that we can handle both more easily. This
patch also required adding an ovverride  `NO_GPU_BUILD` for cases when
we only want to build the source file as normal.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D144214

Files:
  libc/cmake/modules/LLVMLibCObjectRules.cmake
  libc/startup/gpu/amdgpu/CMakeLists.txt
  libc/startup/gpu/nvptx/CMakeLists.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144214.498126.patch
Type: text/x-patch
Size: 10261 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230216/7943ca34/attachment.bin>


More information about the libc-commits mailing list