================ @@ -1014,25 +1014,27 @@ RocmInstallationDetector::getCommonBitcodeLibs( bool isOpenMP = false) const { llvm::SmallVector<ToolChain::BitCodeLibraryInfo, 12> BCLibs; - auto GPUSanEnabled = [GPUSan]() { return std::get<bool>(GPUSan); }; + // GPU Sanitizer currently only supports ASan and is enabled through host + // ASan. + bool GPUSanEnabled = std::get<bool>(GPUSan) && + std::get<const SanitizerArgs>(GPUSan).needsAsanRt(); + auto AddBCLib = [&](ToolChain::BitCodeLibraryInfo BCLib, bool Internalize = true) { BCLib.ShouldInternalize = Internalize; BCLibs.emplace_back(BCLib); }; auto AddSanBCLibs = [&]() { - if (GPUSanEnabled()) { - auto SanArgs = std::get<const SanitizerArgs>(GPUSan); - if (SanArgs.needsAsanRt()) - AddBCLib(getAsanRTLPath(), false); + if (GPUSanEnabled) { + AddBCLib(getAsanRTLPath(), false); } ---------------- jhuber6 wrote:
```suggestion if (GPUSanEnabled) AddBCLib(getAsanRTLPath(), false); ``` https://github.com/llvm/llvm-project/pull/126671 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits