[all-commits] [llvm/llvm-project] 6c9916: [libc] Configure CMAKE_REQUIRED_FLAGS so the GPU c...

Joseph Huber via All-commits all-commits at lists.llvm.org
Tue Jun 25 05:03:18 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6c9916d0d8a40034c5e0dfc157f146855e42520e
      https://github.com/llvm/llvm-project/commit/6c9916d0d8a40034c5e0dfc157f146855e42520e
  Author: Joseph Huber <huberjn at outlook.com>
  Date:   2024-06-25 (Tue, 25 Jun 2024)

  Changed paths:
    M libc/cmake/modules/prepare_libc_gpu_build.cmake
    M llvm/runtimes/CMakeLists.txt

  Log Message:
  -----------
  [libc] Configure CMAKE_REQUIRED_FLAGS so the GPU can use flag checks (#95424)

Summary:
This patch adds `CMAKE_REQUIRED_FLAGS` for the GPU build so checks like
`check_cxx_compiler_flags` work as expected. This is required because we
need to hack around the potential lack of `nvlink` and `ptxas` for NVPTX
targets and the fact that the AMDGPU target needs `-nogpulib` to avoid
errors on lack of ROCm. This makes a few of the checks pass and also
allows us to just check `-mcpu=native` for architecture detection
instead of finding the tools manually.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list