This is an archive of the discontinued LLVM Phabricator instance.

[Driver] Set linkPath and MSVT version when cl.exe is detected, plus STL's hacking.
AbandonedPublic

Authored by STL_MSFT on Aug 17 2017, 7:01 PM.

Details

Reviewers
hintonda
zturner
Summary

This is a revision of https://reviews.llvm.org/D36842 . I don't really know what I'm doing, but this appears to work for my x86 dev build (haven't tried the x64 repro yet).

Diff Detail

Event Timeline

STL_MSFT created this revision.Aug 17 2017, 7:01 PM
hintonda edited edge metadata.Aug 17 2017, 7:43 PM

This looks okay, but since you already include all your include paths in INCLUDE, we should be able to ignore this -- I've removed it in my working copy.

Now, I'm trying to fix the linkPath issue. Looks like duplicated logic already available in the base class, so I'm working on fixing that now.

STL_MSFT abandoned this revision.Aug 17 2017, 8:46 PM

Don abandoned his patch as not being a good approach, so I'm saying goodbye to this one too. I have a new, minimally intrusive patch.

thakis added a subscriber: cfe-commits.
thakis added a subscriber: thakis.
thakis added inline comments.
lib/Driver/ToolChains/MSVC.cpp
135

Having a while loop going up the directory tree stating around on every compiler invocation for supporting a fairly narrow use case seems a bit unfortunate. Maybe we could instead add a flag (or just a cc1 flag, even) to override the check instead?

Oh, I guess this is superseded by https://reviews.llvm.org/D36860 ?

Oh, I guess this is superseded by https://reviews.llvm.org/D36860 ?

Yes, please ignore this patch -- it was just for brainstorming... ;-)

lib/Driver/ToolChains/MSVC.cpp
135

Agreed, this patch was abandoned...