[compiler-rt] compiler-rt: Suppress -g error for gpu builds (PR #202230)

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 8 05:40:04 PDT 2026


================
@@ -426,6 +426,7 @@ macro(construct_compiler_rt_default_triple)
     # Pass the necessary flags to make flag detection work.
     if("${COMPILER_RT_DEFAULT_TARGET_ARCH}" MATCHES "amdgcn")
       set(COMPILER_RT_GPU_BUILD ON)
+      set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -nogpulib")
----------------
jhuber6 wrote:

Huh, I thought I fixed this in the default `clang --target=amdgcn-amd-amdhsa`. It's not supposed to search for the ROCm DL's (unless you pass in a `.bc` because backward compatibility reasons).

https://github.com/llvm/llvm-project/pull/202230


More information about the llvm-commits mailing list