This is an archive of the discontinued LLVM Phabricator instance.

[MSVC] Automatically add atlmfc include and lib directories as system paths.
ClosedPublic

Authored by zturner on Oct 9 2019, 2:51 PM.

Diff Detail

Event Timeline

zturner created this revision.Oct 9 2019, 2:51 PM

This matches the behavior of cl.

Are you sure? In a bare environment, cl.exe doesn't include any system paths, not even to the standard library. It actually uses the INCLUDE environment variable for those paths. Granted, VCVARSALL sets that (and other environment variables), but it's not innate behavior of cl.exe.

This matches the behavior of cl.

Are you sure? In a bare environment, cl.exe doesn't include any system paths, not even to the standard library. It actually uses the INCLUDE environment variable for those paths. Granted, VCVARSALL sets that (and other environment variables), but it's not innate behavior of cl.exe.

Right, sorry. I guess what I mean is that this matches the behavior of running from a cl command prompt, which is what we do elsewhere. This is already in the codepath that is trying to build up a consistent WindowsSdk + CRT environment, we were just missing the atlmfc part.

rnk accepted this revision.Oct 9 2019, 3:54 PM

lgtm

I think the old VS Express editions used to exclude atlmfc, so there's the possibility that we'll be searching non-existent directories, but I think that's OK. Whoever wrote this code was probably basing it on what VS express did. That edition is long gone, and we're better off with this new logic.

This revision is now accepted and ready to land.Oct 9 2019, 3:54 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptOct 10 2019, 1:27 PM