[PATCH] D39502: [Driver] Make clang/cc conforms to UNIX standard

Steven Wu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 6 13:40:37 PST 2017


steven_wu updated this revision to Diff 121779.
steven_wu added a comment.

This seems to be the cleanest solution I can find for CUDA without
touching the job configuration for CUDA. My proposed fix is to bail
out of the jobs that are parts of CUDA offload if some command failed
before that. Now if you hit failures when compiling multiple GPU
architectures, you will error out only once. This is pretty much the exact
same behavior of current driver.

This is not the ideal solution but there is simply no information in the job
setup in current CUDA driver to detect if the input is same across different
jobs. For all the CUDA inputs, it is duplicated into different InputActions
and insert into different OffloadActions. You also cannot detect them by
looking at their name because the following should compiled the same file
twice even there are errors in it:

  cc a.c a.c
  `

Also, the reason I don't know how to craft a testcase is not because I have
trouble with CUDA driver, but how to write a test to check when did the driver
bailed out. Let me know if you have any suggestions.


https://reviews.llvm.org/D39502

Files:
  lib/Driver/Compilation.cpp
  test/Driver/output-file-cleanup.c
  test/Driver/unix-conformance.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39502.121779.patch
Type: text/x-patch
Size: 4122 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20171106/3a770da0/attachment.bin>


More information about the cfe-commits mailing list