This is an archive of the discontinued LLVM Phabricator instance.

[clang][Driver][CUDA] Get rid of unused LibPath
ClosedPublic

Authored by kadircet on Jan 11 2023, 12:59 AM.

Details

Summary

LibPath discovered during InstallationDetection wasn't used anywhere.
Moreover it actually resulted in discarding installations that don't have any
/lib directory.

This is causing troubles for our pipelines downstream, that want to perform
syntax-only analysis on the sources.

Diff Detail

Event Timeline

kadircet created this revision.Jan 11 2023, 12:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 11 2023, 12:59 AM
Herald added subscribers: mattd, yaxunl. · View Herald Transcript
kadircet requested review of this revision.Jan 11 2023, 12:59 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 11 2023, 12:59 AM
tra accepted this revision.Jan 11 2023, 1:53 PM

Given that it's indeed unused, I'm fine with removing it.

That said, it's somewhat odd that in your setup clang was able to find everything but the library directory. You generally would need to have --cuda-path= among compiler options and that should be pointing to a valid CUDA installation.

Can you elaborate on where/how clang manages to find CUDA headers in your case?

This revision is now accepted and ready to land.Jan 11 2023, 1:53 PM

Given that it's indeed unused, I'm fine with removing it.

That said, it's somewhat odd that in your setup clang was able to find everything but the library directory. You generally would need to have --cuda-path= among compiler options and that should be pointing to a valid CUDA installation.

Can you elaborate on where/how clang manages to find CUDA headers in your case?

We actually use a pipeline that runs compilations by recording & replaying past snapshots of our codebase. The record logic we have don't retain access to directories in its required inputs set, as clang stats lots of directories when performing include search etc, which are not ~never needed for the compilation (apart from the one that contains the actual files).

This revision was automatically updated to reflect the committed changes.