Skip to content
This repository was archived by the owner on May 14, 2024. It is now read-only.

Commit 3ddf92f

Browse files
committed
Fix archive unbundling to write to /tmp directory
We recently updated unbundling to write temporary files to /tmp instead of the users working directory. However, we only applied this for bitcode bundles. We now write both bundles and archives to /tmp Change-Id: I0cef691efee3923dca7cb0a26d8d8de9a2fc95fa
1 parent 33d21c5 commit 3ddf92f

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

lib/comgr/src/comgr-compiler.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1299,11 +1299,13 @@ amd_comgr_status_t AMDGPUCompiler::linkBitcodeToBitcode() {
12991299
std::string bundle_entry_id = "hip-amdgcn-amd-amdhsa--gfx" +
13001300
isa_name.substr(index + 3);
13011301

1302-
// Write data to file system so that Offload Bundler can process
1302+
// Write data to file system so that Offload Bundler can process, assuming
1303+
// we didn't already write due to save-temps above
13031304
// TODO: Switch write to VFS
1304-
if (auto Status = outputToFile(Input,
1305-
StringRef(std::string("./") + Input->Name))) {
1306-
return Status;
1305+
if (!env::shouldSaveTemps()) {
1306+
if (auto Status = outputToFile(Input, getFilePath(Input, InputDir))) {
1307+
return Status;
1308+
}
13071309
}
13081310

13091311
// Configure Offload Bundler

0 commit comments

Comments
 (0)