[all-commits] [llvm/llvm-project] a4f553: [libc] Fix using the `libcgpu.a` for NVPTX in non-...

Joseph Huber via All-commits all-commits at lists.llvm.org
Mon Jul 10 11:55:03 PDT 2023


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

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

  Log Message:
  -----------
  [libc] Fix using the `libcgpu.a` for NVPTX in non-LTO builds

CUDA requires a PTX feature to be compiled generally, because the
`libcgpu.a` archive contains LLVM-IR we need to have one present to
compile it. Currently, the wrapper fatbinary format we use to
incorporate these into single-source offloading languages has a special
option to provide this. Since this was not present in the builds, if the
user did not specify it via `-foffload-lto` it would not compile from
CUDA or OpenMP due to the missing PTX features. Fix this by passing it
to the packager invocation.

Reviewed By: jdoerfert

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




More information about the All-commits mailing list