tra added a comment. In D120132#3351391 <https://reviews.llvm.org/D120132#3351391>, @yaxunl wrote:
> > If any input file is HIP program, clang driver will use HIP offload kind for > all inputs. This behavior is similar as cuda-clang. I do not think this is the case as illustrated by the example above. CUDA paths are only added to CUDA compilation. C++ compilation of `b.cc` does not have any of them. > Therefore if any input file is HIP program, HIP include path is added for > each input file compilation. I think this is acceptable. I disagree. HIP-specific include path should apply to HIP-specific cc1 compilation only. > However, when there is only C++ input file, clang driver should not add HIP > or CUDA include path. Agreed. AFAICT this is the case for CUDA. > The current patch breaks that. That's why I think it needs change. I agree. Hence my suggestion to add the path via toolchain-specific `AddClangSystemIncludeArgs`. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D120132/new/ https://reviews.llvm.org/D120132 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits