diff options
author | Benda Xu <heroxbd@gentoo.org> | 2021-02-07 01:24:02 +0800 |
---|---|---|
committer | Benda Xu <heroxbd@gentoo.org> | 2021-02-07 01:26:15 +0800 |
commit | 1f254242a3cbefe3f657384c06de728191633a28 (patch) | |
tree | dd36cee7a2386f1200ec15b60d9327787ad53adf /sys-devel | |
parent | media-libs/lcms: bump to 2.12 (diff) | |
download | gentoo-1f254242a3cbefe3f657384c06de728191633a28.tar.gz gentoo-1f254242a3cbefe3f657384c06de728191633a28.tar.bz2 gentoo-1f254242a3cbefe3f657384c06de728191633a28.zip |
sys-devel/llvm-roc: set default device-libs.
Disable HIP runtime check, it is not needed for Gentoo.
Only the patch is updated, directly move 4.0.0-r1 to -r2.
Closes: https://bugs.gentoo.org/769005
Package-Manager: Portage-3.0.12, Repoman-3.0.1
Signed-off-by: Benda Xu <heroxbd@gentoo.org>
Diffstat (limited to 'sys-devel')
-rw-r--r-- | sys-devel/llvm-roc/files/llvm-roc-4.0.0-hip-location.patch | 39 | ||||
-rw-r--r-- | sys-devel/llvm-roc/llvm-roc-4.0.0-r2.ebuild (renamed from sys-devel/llvm-roc/llvm-roc-4.0.0-r1.ebuild) | 0 |
2 files changed, 38 insertions, 1 deletions
diff --git a/sys-devel/llvm-roc/files/llvm-roc-4.0.0-hip-location.patch b/sys-devel/llvm-roc/files/llvm-roc-4.0.0-hip-location.patch index 8342299f1139..225adc709666 100644 --- a/sys-devel/llvm-roc/files/llvm-roc-4.0.0-hip-location.patch +++ b/sys-devel/llvm-roc/files/llvm-roc-4.0.0-hip-location.patch @@ -1,5 +1,7 @@ replace hardcoded hip finder with Gentoo paths. +It is not necessary to check HIP runtime each time. + Author: Benda Xu <heroxbd@gentoo.org> Index: llvm-project-rocm-4.0.0/clang/lib/Driver/ToolChains/AMDGPU.cpp @@ -12,7 +14,7 @@ Index: llvm-project-rocm-4.0.0/clang/lib/Driver/ToolChains/AMDGPU.cpp - // Try to find relative to the compiler binary. - const char *InstallDir = D.getInstalledDir(); -+ Candidates.emplace_back(D.SysRoot + "/usr/lib/hip", /*StrictChecking=*/true); ++ Candidates.emplace_back(D.SysRoot + "/usr", /*StrictChecking=*/true); - // Check both a normal Unix prefix position of the clang binary, as well as - // the Windows-esque layout the ROCm packages use with the host architecture @@ -45,3 +47,38 @@ Index: llvm-project-rocm-4.0.0/clang/lib/Driver/ToolChains/AMDGPU.cpp return Candidates; } +@@ -273,33 +244,7 @@ void RocmInstallationDetector::detectDev + } + + void RocmInstallationDetector::detectHIPRuntime() { +- auto Candidates = getInstallationPathCandidates(); +- auto &FS = D.getVFS(); +- +- for (const auto &Candidate : Candidates) { +- InstallPath = Candidate.Path; +- if (InstallPath.empty() || !FS.exists(InstallPath)) +- continue; +- +- BinPath = InstallPath; +- llvm::sys::path::append(BinPath, "bin"); +- IncludePath = InstallPath; +- llvm::sys::path::append(IncludePath, "include"); +- LibPath = InstallPath; +- llvm::sys::path::append(LibPath, "lib"); +- +- llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> VersionFile = +- FS.getBufferForFile(BinPath + "/.hipVersion"); +- if (!VersionFile && Candidate.StrictChecking) +- continue; +- +- if (HIPVersionArg.empty() && VersionFile) +- ParseHIPVersionFile((*VersionFile)->getBuffer()); +- +- HasHIPRuntime = true; +- return; +- } +- HasHIPRuntime = false; ++ HasHIPRuntime = true; + } + + void RocmInstallationDetector::print(raw_ostream &OS) const { diff --git a/sys-devel/llvm-roc/llvm-roc-4.0.0-r1.ebuild b/sys-devel/llvm-roc/llvm-roc-4.0.0-r2.ebuild index 5714ae9b7198..5714ae9b7198 100644 --- a/sys-devel/llvm-roc/llvm-roc-4.0.0-r1.ebuild +++ b/sys-devel/llvm-roc/llvm-roc-4.0.0-r2.ebuild |