[PATCH] D131278: [CUDA] Fix output name being replaced in device-only mode

Joseph Huber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 5 15:24:30 PDT 2022

jhuber6 added inline comments.

Comment at: clang/test/Driver/cuda-bindings.cu:148
+// RUN: | FileCheck -check-prefix=D_ONLY %s
+// D_ONLY: "foo.o"
tra wrote:
> jhuber6 wrote:
> > tra wrote:
> > > Ideally we want to test that the output file actually survives the compilation. It's traky to do for in-tree tests as we don't have `ptxas`. However, we should be able to add a script which would just touch whatever is specified with `-o` argument and ignore the rest and then actually do run clang with `--ptxas-path=/path/to/dummy-ptxas` and then verify file existence.
> > Yeah, I wasn't sure if there was a good way. I don't have any CUDA machines to test so I just went with the simplest version.
> This is a more general problem, not specific to this test -- we have other tests where we assume that if something is printed by `cc -###`, then it must be real. 
> I guess it's more of a TODO note for a potential improvement.
> This patch is good to go as is.
Okay, I'll land it soon.

  rG LLVM Github Monorepo



More information about the cfe-commits mailing list