[compiler-rt] Fix ubsan_minimal build fail for GPU targets on Windows (PR #214143)

via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 5 00:15:11 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: jinge90

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/214143.diff


1 Files Affected:

- (modified) compiler-rt/lib/ubsan_minimal/ubsan_minimal_handlers.cpp (+2) 


``````````diff
diff --git a/compiler-rt/lib/ubsan_minimal/ubsan_minimal_handlers.cpp b/compiler-rt/lib/ubsan_minimal/ubsan_minimal_handlers.cpp
index e68e494564cc8..ff458a42197bb 100644
--- a/compiler-rt/lib/ubsan_minimal/ubsan_minimal_handlers.cpp
+++ b/compiler-rt/lib/ubsan_minimal/ubsan_minimal_handlers.cpp
@@ -1,8 +1,10 @@
 #include "sanitizer_common/sanitizer_atomic.h"
 
 #include <stdint.h>
+#if !(SANITIZER_AMDGPU || SANITIZER_NVPTX || SANITIZER_SPIRV)
 #include <stdlib.h>
 #include <string.h>
+#endif
 
 #if defined(KERNEL_USE)
 extern "C" void ubsan_message(const char *msg);

``````````

</details>


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


More information about the llvm-commits mailing list