[hipcc] Add HIP_CLANG_LAUNCHER for launching Clang through a wrapper executable#1490
Conversation
Signed-off-by: Gavin Zhao <git@gzgz.dev>
|
Thank you for submitting a Pull Request (PR) to the LLVM Project! This PR will be automatically labeled and the relevant teams will be notified. If you wish to, you can add reviewers by using the "Reviewers" section on this page. If this is not working for you, it is probably because you do not have write permissions for the repository. In which case you can instead tag reviewers by name in a comment by using If you have received no comments on your PR for a week, you can request a review by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate is once a week. Please remember that you are asking for valuable time from other developers. If you have further questions, they may be answered by the LLVM GitHub User Guide. You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums. |
|
This seems fine to me. To check my understanding, when using hipcc we're adding the capability to automatically prepend strings to the generated clang command via an environment variable? One major caveat: hipcc as a clang wrapper is being sunset. Moving forward, we'd like users to use clang/amdclang directly, and eventually we'd like to remove hipcc (or replace it with a symlink to clang). That could simplify things like this, where you could just alias clang or something similar instead of using this launcher mechanism. I'm still fine with this landing in the meantime, but will leave final approval to @david-salinas |
There are env vars HIPCC_COMPILE_FLAGS_APPEND and HIPCC_LINK_FLAGS_APPEND, but those just add flags/args to the clang invocation. This env var would prepend it to the clang command. I'm also fine with this change, but there are other ways to accomplish the same thing: change the HIPCC command in your cmake file, or creating a command alias in your environment. We are deprecating hipcc in favour of amdclang (in a future release), so eventually you will need to use one of the other mechanisms anyway when hipcc is removed. |
Yep,for these situations, we have |
Fixes #72. Originally #14. Moved from ROCm/HIPCC#148.
This allows Clang to be called through a compiler wrapper/launcher. This is most commonly used to run clang through a compiler launcher that can cache compilations, such as ccache and sccache, to allow caching of compilation artifacts.