summaryrefslogtreecommitdiff
path: root/dev-libs/rocm-comgr/files/rocm-comgr-6.3.0-bypass-device-libs-copy.patch
blob: 8c126d9a5108a773cad0bdc38c5b4bf03f8d35d9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Use files from dev-libs/rocm-device-libs instead of their copy in /tmp.
--- a/src/comgr-compiler.cpp
+++ b/src/comgr-compiler.cpp
@@ -1070,24 +1070,7 @@ amd_comgr_status_t AMDGPUCompiler::addCompilationFlags() {
 }
 
 amd_comgr_status_t AMDGPUCompiler::addDeviceLibraries() {
-  llvm::SmallString<128> FakeRocmDir = TmpDir;
-  path::append(FakeRocmDir, "rocm");
-  llvm::SmallString<128> DeviceLibsDir = FakeRocmDir;
-  path::append(DeviceLibsDir, "amdgcn", "bitcode");
-  if (fs::create_directory(InputDir)) {
-    return AMD_COMGR_STATUS_ERROR;
-  }
-  Args.push_back(Saver.save(Twine("--rocm-path=") + FakeRocmDir).data());
   NoGpuLib = false;
-
-  for (auto DeviceLib : getDeviceLibraries()) {
-    llvm::SmallString<128> DeviceLibPath = DeviceLibsDir;
-    path::append(DeviceLibPath, std::get<0>(DeviceLib));
-    if (auto Status = outputToFile(std::get<1>(DeviceLib), DeviceLibPath)) {
-      return Status;
-    }
-  }
-
   return AMD_COMGR_STATUS_SUCCESS;
 }