[PATCH] D131278: [CUDA] Fix output name being replaced in device-only mode
Artem Belevich via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 5 15:23:45 PDT 2022
tra 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:
> > 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.
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
More information about the cfe-commits