This is an archive of the discontinued LLVM Phabricator instance.

[CUDA] Warn about unsupported CUDA SDK version only if it's used.
ClosedPublic

Authored by tra on Mar 11 2020, 3:00 PM.

Details

Summary

This fixes an issue with clang issuing a warning about unknown CUDA SDK if it's detected during non-CUDA compilation.

Diff Detail

Event Timeline

tra created this revision.Mar 11 2020, 3:00 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 11 2020, 3:00 PM
tra updated this revision to Diff 249773.Mar 11 2020, 3:07 PM
tra retitled this revision from [CUDA] Warn about unsupported CUDA SDK version only if it's used. to [CUDA] Warn about unsupported CUDA SDK version only if it's used..

Added a test.

yaxunl accepted this revision.Mar 11 2020, 3:33 PM

LGTM. Thanks!

This revision is now accepted and ready to land.Mar 11 2020, 3:33 PM
tra updated this revision to Diff 249792.Mar 11 2020, 4:15 PM

clang-formatted the changes.

This revision was automatically updated to reflect the committed changes.
tra added a subscriber: hans.Mar 16 2020, 3:26 PM

@hans -- this should be cherry-picked into 10 if it's not too late yet.

hans added a comment.Mar 18 2020, 2:24 AM
In D76030#1925445, @tra wrote:

@hans -- this should be cherry-picked into 10 if it's not too late yet.

It's probably too late for 10.0.0, but sounds like a good candidate for 10.0.1.

hans added a comment.Mar 23 2020, 8:11 AM
In D76030#1925445, @tra wrote:

@hans -- this should be cherry-picked into 10 if it's not too late yet.

It's probably too late for 10.0.0, but sounds like a good candidate for 10.0.1.

Sounds like I underestimated the importance of this. Merged as d32170dbd5b0d54436537b6b75beaf44324e0c28, as per https://bugs.llvm.org/show_bug.cgi?id=45270