[PATCH] D88730: [HIP] Fix default output file for -E

Artem Belevich via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Oct 2 12:10:29 PDT 2020


tra accepted this revision.
tra added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang/test/Driver/hip-output-file-name.hip:13-15
+// RUN: %clang -### -E -target x86_64-linux-gnu \
+// RUN:   --cuda-gpu-arch=gfx803 --cuda-gpu-arch=gfx900 %s \
+// RUN: 2>&1 | FileCheck -check-prefixes=DASH %s
----------------
What does it mean for `-E` to be used when we compile for host and multiple devices. I believe for CUDA clang errors out unless there's only one sub-compilation. What does HIP do when it's run with `-E -o -` ?

Looks like CUDA (and, maybe HIP, too) has a bug there. `-E` will run preprocess on all subcompilations. `-E -o -` will error out claiming that you can't use `-o` for multiple output files, even though `-###` shows the same `-o -` in all subcompilations in both cases.






CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88730/new/

https://reviews.llvm.org/D88730



More information about the cfe-commits mailing list