[clang] Reapply "[Driver][ROCm][OpenMP] Fix default ockl linking for OpenMP."… (PR #126671)
Amit Kumar Pandey via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 11 07:49:42 PST 2025
================
@@ -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);
}
----------------
ampandey-1995 wrote:
Done.
https://github.com/llvm/llvm-project/pull/126671
More information about the cfe-commits
mailing list