[all-commits] [llvm/llvm-project] ba8c96: [Clang] Do not implicitly link C libraries for the...

Joseph Huber via All-commits all-commits at lists.llvm.org
Wed Sep 18 06:44:30 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ba8c96593c78cda44523abf2abcd7faeef0471af
      https://github.com/llvm/llvm-project/commit/ba8c96593c78cda44523abf2abcd7faeef0471af
  Author: Joseph Huber <huberjn at outlook.com>
  Date:   2024-09-18 (Wed, 18 Sep 2024)

  Changed paths:
    M clang/lib/Driver/ToolChains/AMDGPU.cpp
    M clang/lib/Driver/ToolChains/Clang.cpp
    M clang/lib/Driver/ToolChains/CommonArgs.cpp
    M clang/lib/Driver/ToolChains/CommonArgs.h
    M clang/lib/Driver/ToolChains/Cuda.cpp
    M clang/test/Driver/openmp-offload-gpu.c
    M libc/cmake/modules/prepare_libc_gpu_build.cmake
    M libcxx/cmake/caches/AMDGPU.cmake
    M libcxx/cmake/caches/NVPTX.cmake

  Log Message:
  -----------
  [Clang] Do not implicitly link C libraries for the GPU targets (#109052)

Summary:
I initially thought that it would be convenient to automatically link
these libraries like they are for standard C/C++ targets. However, this
created issues when trying to use C++ as a GPU target. This patch moves
the logic to now implicitly pass it as part of the offloading toolchain
instead, if found. This means that the user needs to set the target
toolchain for the link job for automatic detection, but can still be
done manually via `-Xoffload-linker -lc`.



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