Skip to content

Commit

Permalink
[OpenMP] Fixes save-temps multi-arch compilation with opaque-offload-…
Browse files Browse the repository at this point in the history
…linker

Fixes multi-arch save-temps compilation in opaque-offload-linker.
Issue caused by files getting overwritten during unpacking.
Adds TargetID to temp file name.

Change-Id: Iebd34f9f6cf9375c08b3f775397b62b372fa8800
  • Loading branch information
nicebert authored and ronlieb committed Sep 10, 2024
1 parent 671a68e commit 307e0d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion clang/lib/Driver/ToolChains/Clang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9416,7 +9416,7 @@ void LinkerWrapper::ConstructOpaqueJob(Compilation &C, const JobAction &JA,
if (II.isFilename()) {
OutputFile = llvm::sys::path::stem(II.getFilename()).str();
OutputFilePrefix = llvm::sys::path::stem(II.getBaseInput()).str() +
"-openmp-" + TheTriple.str();
"-openmp-" + TheTriple.str() + "-" + TargetID.str();

// generate command to unpackage each II.getFilename()
auto UnpackagedFileName =
Expand Down

0 comments on commit 307e0d3

Please sign in to comment.