[all-commits] [llvm/llvm-project] d51d2b: [libc] Support add_object_library for the GPU build

Joseph Huber via All-commits all-commits at lists.llvm.org
Mon Feb 20 07:37:35 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d51d2b5909036cd13fcca7d5b5d1bed48dff3053
      https://github.com/llvm/llvm-project/commit/d51d2b5909036cd13fcca7d5b5d1bed48dff3053
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2023-02-20 (Mon, 20 Feb 2023)

  Changed paths:
    M libc/cmake/modules/LLVMLibCObjectRules.cmake
    M libc/startup/gpu/amdgpu/CMakeLists.txt
    M libc/startup/gpu/nvptx/CMakeLists.txt

  Log Message:
  -----------
  [libc] Support add_object_library for the GPU build

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.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D144214


  Commit: 4a872412d868ff468a30a99060293e11a43ffab9
      https://github.com/llvm/llvm-project/commit/4a872412d868ff468a30a99060293e11a43ffab9
  Author: Joseph Huber <jhuber6 at vols.utk.edu>
  Date:   2023-02-20 (Mon, 20 Feb 2023)

  Changed paths:
    M libc/cmake/modules/LLVMLibCObjectRules.cmake

  Log Message:
  -----------
  [libc] Fix dependencies for generating the GPU binary file

This patch adjusts the way dependencies are handled in the packaed
version of the GPU libc runtime. Previously the files were not getting
updated properly in the install when they changed.

Depends on D144214

Reviewed By: lntue

Differential Revision: https://reviews.llvm.org/D144280


Compare: https://github.com/llvm/llvm-project/compare/287267c23a08...4a872412d868


More information about the All-commits mailing list