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

Commit

Permalink
Fix archive unbundling to write to /tmp directory
Browse files Browse the repository at this point in the history
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
  • Loading branch information
lamb-j committed Dec 8, 2023
1 parent 33d21c5 commit 3ddf92f
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lib/comgr/src/comgr-compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1299,11 +1299,13 @@ amd_comgr_status_t AMDGPUCompiler::linkBitcodeToBitcode() {
std::string bundle_entry_id = "hip-amdgcn-amd-amdhsa--gfx" +
isa_name.substr(index + 3);

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

// Configure Offload Bundler
Expand Down

0 comments on commit 3ddf92f

Please sign in to comment.