jhuber6 marked an inline comment as done. jhuber6 added inline comments.
================ Comment at: clang/lib/Basic/Targets/NVPTX.cpp:171 Builder.defineMacro("__NVPTX__"); - if (Opts.CUDAIsDevice || Opts.OpenMPIsDevice) { + if (Opts.CUDAIsDevice || Opts.OpenMPIsDevice || !HostTarget) { // Set __CUDA_ARCH__ for the GPU specified. ---------------- tra wrote: > Wouldn't just `if(!HostTarget)` be sufficient here? > `HostTarget` is the host toolchain, provided via `-aux-triple`. So it's set for OpenMP and CUDA but not for a standalone. ================ Comment at: clang/test/Frontend/nvptx-macros.c:1 +// REQUIRES: nvptx-registered-target + ---------------- tra wrote: > I'd rename the file to make it more obvious that it deals with a standalone > compilation. > > `standalone-nvptx-macros.c` ? I can do that. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D146975/new/ https://reviews.llvm.org/D146975 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits