[PATCH] D145509: [HIP] Fix temporary files
Yaxun Liu via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 7 18:55:55 PST 2023
yaxunl added a comment.
In D145509#4175773 <https://reviews.llvm.org/D145509#4175773>, @tra wrote:
> LGTM, but we should probably get someone familiar with macos to chime in, just in case there may be some reason behind macos using temp directories here.
>
>> This change is OK for MacOS as lipo does not requires specific
>
> I'm curious why lipo has been singled out. Is that the only use case that ends up using this path?
AFAIK clang/llvm tools and lld does not depend on input file names, but I am not so sure about lipo, that's why I checked lipo man page.
However, it seems the previous code using GetTemporaryDirectory was intentional (https://reviews.llvm.org/D111269). My guess is that lipo using some hash of input file name in the generated binary, GetTemporaryPath will make the generated binary non-deterministic.
It seems I need to limit this change to HIP as HIP uses clang-offload-bundler which generates binary not depending on input file names.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145509/new/
https://reviews.llvm.org/D145509
More information about the cfe-commits
mailing list