LLVM Bugzilla is read-only and represents the historical archive of all LLVM issues filled before November 26, 2021. Use github to submit LLVM bugs

Bug 45270 - Please backport eb2ba2ea953b5e to 10.x ([CUDA] Warn about unsupported CUDA SDK version only if it's used)
Summary: Please backport eb2ba2ea953b5e to 10.x ([CUDA] Warn about unsupported CUDA SD...
Status: RESOLVED FIXED
Alias: None
Product: clang
Classification: Unclassified
Component: -New Bugs (show other bugs)
Version: 10.0
Hardware: PC Linux
: P enhancement
Assignee: Unassigned Clang Bugs
URL:
Keywords:
Depends on:
Blocks: release-10.0.0
  Show dependency tree
 
Reported: 2020-03-21 13:00 PDT by Michał Górny
Modified: 2020-03-23 08:23 PDT (History)
6 users (show)

See Also:
Fixed By Commit(s):


Attachments
0001-CUDA-Warn-about-unsupported-CUDA-SDK-version-only-if.patch (rebased) (5.19 KB, patch)
2020-03-21 13:00 PDT, Michał Górny
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny 2020-03-21 13:00:30 PDT
Created attachment 23270 [details]
0001-CUDA-Warn-about-unsupported-CUDA-SDK-version-only-if.patch (rebased)

We've gotten a bug report today indicating that the new clang version throws warning about unsupported CUDA versions unconditionally (even when not using CUDA).  This means that if the user happens to have newer CUDA installed, a lot of CMake checks fail wrongly, and it can't even compile LLVM correctly.

I realize that it's really late for fixes but I think this is a serious blocker.  I'm attaching a rebased version of the following commit:

commit eb2ba2ea953b5ea73cdbb598f77470bde1c6a011
Author: Artem Belevich <tra@google.com>
Date:   2020-03-11 22:53:03 +0100

    [CUDA] Warn about unsupported CUDA SDK version only if it's used.
    
    This fixes an issue with clang issuing a warning about unknown CUDA SDK if it's
    detected during non-CUDA compilation.
    
    Differential Revision: https://reviews.llvm.org/D76030
Comment 1 Hans Wennborg 2020-03-23 08:13:26 PDT
I guess I had underestimated the importance of this :( Merged as d32170dbd5b0d54436537b6b75beaf44324e0c28