[compiler-rt] [llvm] [compiler-rt] Add AMDGPU Device UndefinedBehaviorSanitizer runtime (PR #219972)

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 8 19:53:00 PDT 2026


================
@@ -142,3 +176,16 @@ endif()
 add_lit_testsuite(check-ubsan "Running UndefinedBehaviorSanitizer tests"
   ${UBSAN_TESTSUITES}
   DEPENDS ${UBSAN_TEST_DEPS})
+
+# Add offload dependencies as compiler-rt is built before offload.
+function(_ubsan_depend_on_offload)
+  if(NOT TARGET check-ubsan)
+    return()
+  endif()
+  foreach(dep omp omptarget)
+    if(TARGET ${dep})
+      add_dependencies(check-ubsan ${dep})
----------------
jhuber6 wrote:

Honestly, this was pretty hacky and it's not strictly necessary, might just be better off removing it. Means if you `rm -fr libomptarget.so` and then run `check-ubsan` it can fail if you enabled that and have a GPU to run it on, probably won't bite in practice.

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


More information about the llvm-commits mailing list