================
@@ -1816,17 +1841,21 @@ collectSanitizerRuntimes(const ToolChain &TC, const 
ArgList &Args,
   }
   if (SanArgs.needsUbsanLoopDetectRt())
     NonWholeStaticRuntimes.push_back("ubsan_loop_detect");
+  if (hostNeedsUbsanDeviceRt(C, TC)) {
----------------
yxsamliu wrote:

`collectSanitizerRuntimes()` returns early for `-shared`, before adding 
`ubsan_device`. A shared library can contain UBSan-instrumented GPU code, and 
the final executable link may not know that this runtime is needed. How is 
device UBSan intended to work for shared libraries?

https://github.com/llvm/llvm-project/pull/219973
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to