mirror of
https://git.proxmox.com/git/llvm-toolchain
synced 2025-07-27 04:51:34 +00:00
rebase of the patch
This commit is contained in:
parent
57695b959b
commit
7e4d599aa8
19
debian/patches/amdgpu/bitcode-multiarch.patch
vendored
19
debian/patches/amdgpu/bitcode-multiarch.patch
vendored
@ -11,11 +11,11 @@ Forwarded: not-needed
|
||||
clang/lib/Driver/ToolChains/AMDGPU.cpp | 19 +++++++++++++------
|
||||
1 file changed, 13 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/clang/lib/Driver/ToolChains/AMDGPU.cpp b/clang/lib/Driver/ToolChains/AMDGPU.cpp
|
||||
index f20b28a66c67..2e8e56b39ff6 100644
|
||||
--- a/clang/lib/Driver/ToolChains/AMDGPU.cpp
|
||||
+++ b/clang/lib/Driver/ToolChains/AMDGPU.cpp
|
||||
@@ -14,9 +14,11 @@
|
||||
Index: llvm-toolchain-15-15.0.7/clang/lib/Driver/ToolChains/AMDGPU.cpp
|
||||
===================================================================
|
||||
--- llvm-toolchain-15-15.0.7.orig/clang/lib/Driver/ToolChains/AMDGPU.cpp
|
||||
+++ llvm-toolchain-15-15.0.7/clang/lib/Driver/ToolChains/AMDGPU.cpp
|
||||
@@ -14,6 +14,7 @@
|
||||
#include "clang/Driver/DriverDiagnostic.h"
|
||||
#include "clang/Driver/InputInfo.h"
|
||||
#include "clang/Driver/Options.h"
|
||||
@ -23,11 +23,7 @@ index f20b28a66c67..2e8e56b39ff6 100644
|
||||
#include "llvm/Option/ArgList.h"
|
||||
#include "llvm/Support/Error.h"
|
||||
#include "llvm/Support/FileUtilities.h"
|
||||
+#include "llvm/Support/Host.h"
|
||||
#include "llvm/Support/LineIterator.h"
|
||||
#include "llvm/Support/Path.h"
|
||||
#include "llvm/Support/VirtualFileSystem.h"
|
||||
@@ -422,16 +424,21 @@ void RocmInstallationDetector::detectDeviceLibrary() {
|
||||
@@ -423,16 +424,21 @@ void RocmInstallationDetector::detectDev
|
||||
// The possible structures are:
|
||||
// - ${ROCM_ROOT}/amdgcn/bitcode/*
|
||||
// - ${ROCM_ROOT}/lib/*
|
||||
@ -55,6 +51,3 @@ index f20b28a66c67..2e8e56b39ff6 100644
|
||||
auto Path = CandidatePath;
|
||||
for (auto SubDir : SubDirs)
|
||||
llvm::sys::path::append(Path, SubDir);
|
||||
--
|
||||
2.39.2
|
||||
|
||||
|
39
debian/patches/amdgpu/usr-search-paths.patch
vendored
39
debian/patches/amdgpu/usr-search-paths.patch
vendored
@ -15,10 +15,10 @@ Differential Revision: https://reviews.llvm.org/D135796
|
||||
clang/test/Driver/hip-version.hip | 8 +++++
|
||||
3 files changed, 41 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/clang/lib/Driver/ToolChains/AMDGPU.cpp b/clang/lib/Driver/ToolChains/AMDGPU.cpp
|
||||
index 6246568710916..261594171564e 100644
|
||||
--- a/clang/lib/Driver/ToolChains/AMDGPU.cpp
|
||||
+++ b/clang/lib/Driver/ToolChains/AMDGPU.cpp
|
||||
Index: llvm-toolchain-15-15.0.7/clang/lib/Driver/ToolChains/AMDGPU.cpp
|
||||
===================================================================
|
||||
--- llvm-toolchain-15-15.0.7.orig/clang/lib/Driver/ToolChains/AMDGPU.cpp
|
||||
+++ llvm-toolchain-15-15.0.7/clang/lib/Driver/ToolChains/AMDGPU.cpp
|
||||
@@ -10,12 +10,14 @@
|
||||
#include "CommonArgs.h"
|
||||
#include "clang/Basic/TargetID.h"
|
||||
@ -34,7 +34,7 @@ index 6246568710916..261594171564e 100644
|
||||
#include "llvm/Support/LineIterator.h"
|
||||
#include "llvm/Support/Path.h"
|
||||
#include "llvm/Support/VirtualFileSystem.h"
|
||||
@@ -306,6 +308,14 @@ RocmInstallationDetector::getInstallationPathCandidates() {
|
||||
@@ -306,6 +308,14 @@ RocmInstallationDetector::getInstallatio
|
||||
ROCmSearchDirs.emplace_back(D.SysRoot + "/opt/" + LatestROCm,
|
||||
/*StrictChecking=*/true);
|
||||
|
||||
@ -49,11 +49,13 @@ index 6246568710916..261594171564e 100644
|
||||
DoPrintROCmSearchDirs();
|
||||
return ROCmSearchDirs;
|
||||
}
|
||||
@@ -461,18 +471,30 @@ void RocmInstallationDetector::detectHIPRuntime() {
|
||||
@@ -461,18 +471,30 @@ void RocmInstallationDetector::detectHIP
|
||||
llvm::sys::path::append(IncludePath, "include");
|
||||
LibPath = InstallPath;
|
||||
llvm::sys::path::append(LibPath, "lib");
|
||||
-
|
||||
+ SharePath = InstallPath;
|
||||
+ llvm::sys::path::append(SharePath, "share");
|
||||
|
||||
- llvm::ErrorOr<std::unique_ptr<llvm::MemoryBuffer>> VersionFile =
|
||||
- FS.getBufferForFile(BinPath + "/.hipVersion");
|
||||
- if (!VersionFile && Candidate.StrictChecking)
|
||||
@ -61,9 +63,6 @@ index 6246568710916..261594171564e 100644
|
||||
-
|
||||
- if (HIPVersionArg.empty() && VersionFile)
|
||||
- if (parseHIPVersionFile((*VersionFile)->getBuffer()))
|
||||
+ SharePath = InstallPath;
|
||||
+ llvm::sys::path::append(SharePath, "share");
|
||||
+
|
||||
+ // If HIP version file can be found and parsed, use HIP version from there.
|
||||
+ for (const auto &VersionFilePath :
|
||||
+ {std::string(SharePath) + "/hip/version",
|
||||
@ -90,11 +89,11 @@ index 6246568710916..261594171564e 100644
|
||||
}
|
||||
HasHIPRuntime = false;
|
||||
}
|
||||
diff --git a/clang/lib/Driver/ToolChains/ROCm.h b/clang/lib/Driver/ToolChains/ROCm.h
|
||||
index 33baaa887043e..b16deecdebec5 100644
|
||||
--- a/clang/lib/Driver/ToolChains/ROCm.h
|
||||
+++ b/clang/lib/Driver/ToolChains/ROCm.h
|
||||
@@ -107,6 +107,7 @@ class RocmInstallationDetector {
|
||||
Index: llvm-toolchain-15-15.0.7/clang/lib/Driver/ToolChains/ROCm.h
|
||||
===================================================================
|
||||
--- llvm-toolchain-15-15.0.7.orig/clang/lib/Driver/ToolChains/ROCm.h
|
||||
+++ llvm-toolchain-15-15.0.7/clang/lib/Driver/ToolChains/ROCm.h
|
||||
@@ -107,6 +107,7 @@ private:
|
||||
SmallString<0> LibPath;
|
||||
SmallString<0> LibDevicePath;
|
||||
SmallString<0> IncludePath;
|
||||
@ -102,12 +101,12 @@ index 33baaa887043e..b16deecdebec5 100644
|
||||
llvm::StringMap<std::string> LibDeviceMap;
|
||||
|
||||
// Libraries that are always linked.
|
||||
diff --git a/clang/test/Driver/hip-version.hip b/clang/test/Driver/hip-version.hip
|
||||
index a9bac813a9195..4ef9e4ade0881 100644
|
||||
--- a/clang/test/Driver/hip-version.hip
|
||||
+++ b/clang/test/Driver/hip-version.hip
|
||||
Index: llvm-toolchain-15-15.0.7/clang/test/Driver/hip-version.hip
|
||||
===================================================================
|
||||
--- llvm-toolchain-15-15.0.7.orig/clang/test/Driver/hip-version.hip
|
||||
+++ llvm-toolchain-15-15.0.7/clang/test/Driver/hip-version.hip
|
||||
@@ -9,6 +9,14 @@
|
||||
// RUN: --target=amdgcn-amd-amdhsa \
|
||||
// RUN: -target amdgcn-amd-amdhsa \
|
||||
// RUN: | FileCheck -check-prefixes=FOUND %s
|
||||
|
||||
+// RUN: rm -rf %t/Inputs
|
||||
|
Loading…
Reference in New Issue
Block a user