[compiler-rt] [compiler-rt] Add COMPILER_RT_GPU_THIN_LTO to build with -flto=thin (PR #226916)

Wenju He via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 29 00:04:20 PDT 2026


================
@@ -397,7 +399,11 @@ if(COMPILER_RT_GPU_BUILD)
   append_list_if(UBSAN_COMMON_SUPPORTED_ARCH -ffreestanding SANITIZER_COMMON_CFLAGS)
   append_list_if(COMPILER_RT_HAS_NOGPULIB_FLAG -nogpulib SANITIZER_COMMON_CFLAGS)
   append_list_if(COMPILER_RT_HAS_NOSTDLIBINC_FLAG -nostdlibinc SANITIZER_COMMON_CFLAGS)
-  append_list_if(COMPILER_RT_HAS_FLTO_FLAG -flto SANITIZER_COMMON_CFLAGS)
+  if(COMPILER_RT_GPU_THIN_LTO)
+    append_list_if(COMPILER_RT_HAS_FLTO_THIN_FLAG -flto=thin SANITIZER_COMMON_CFLAGS)
+  else()
+    append_list_if(COMPILER_RT_HAS_FLTO_FLAG -flto SANITIZER_COMMON_CFLAGS)
----------------
wenju-he wrote:

Seems not. Fixed in https://github.com/llvm/llvm-project/pull/226916/commits/c8358700b85e802a833977ab4cedcf0d0f8a465b

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


More information about the llvm-commits mailing list