[clang] [HIP] Pass `-O0` by default for HIP no-RDC compilations (PR #211790)

Yaxun Liu via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 24 08:50:53 PDT 2026


yxsamliu wrote:

Was this behavior change requested by users?

HIP no-RDC is similar to C++ LTO here: the device link step is doing link-time work, and `clang-linker-wrapper` is playing a role similar to `ld.lld`. For consistency, I think the default should match C++ LTO / `ld.lld`: if the user does not pass any `-O`, we should not add `-O0` only for HIP no-RDC. Users who want LTO `O0` can still pass `-O0` explicitly.

https://github.com/llvm/llvm-project/pull/211790


More information about the cfe-commits mailing list