diff options
author | Stephan T. Lavavej <stl@exchange.microsoft.com> | 2017-08-21 22:19:33 +0000 |
---|---|---|
committer | Stephan T. Lavavej <stl@exchange.microsoft.com> | 2017-08-21 22:19:33 +0000 |
commit | 4c30b743907c032a84dbd10bbf4c8587ec259c94 (patch) | |
tree | 1adfda35175b25bb86a4fa1da8af5a48d2d037db /llvm/lib | |
parent | 5e3037cfc46d082ba350c2c879c82520d94002ea (diff) | |
download | bcm5719-llvm-4c30b743907c032a84dbd10bbf4c8587ec259c94.tar.gz bcm5719-llvm-4c30b743907c032a84dbd10bbf4c8587ec259c94.zip |
[Driver] Recognize DevDiv internal builds of MSVC, with a different directory structure.
This is a reasonably non-intrusive change, which I've verified
works for both x86 and x64 DevDiv-internal builds.
The idea is to change `bool IsVS2017OrNewer` into a 3-state
`ToolsetLayout VSLayout`. Either a build is DevDiv-internal,
released VS 2017 or newer, or released VS 2015 or older. When looking at
the directory structure, if instead of `"VC"` we see `"x86ret"`, `"x86chk"`,
`"amd64ret"`, or `"amd64chk"`, we recognize this as a DevDiv-internal build.
After we get past the directory structure validation, we use this knowledge
to regenerate paths appropriately. `llvmArchToDevDivInternalArch()` knows how
we use `"i386"` subdirectories, and `MSVCToolChain::getSubDirectoryPath()`
uses that. It also knows that DevDiv-internal builds have an `"inc"`
subdirectory instead of `"include"`.
This may still not be the "right" fix in any sense, but I believe that it's
non-intrusive in the sense that if the special directory names aren't found,
no codepaths are affected. (`ToolsetLayout::OlderVS` and
`ToolsetLayout::VS2017OrNewer` correspond to `IsVS2017OrNewer` being `false`
or `true`, respectively.) I searched for all references to `IsVS2017OrNewer`,
which are places where Clang cares about VS's directory structure, and the
only one that isn't being patched is some logic to deal with
cross-compilation. I'm fine with that not working for DevDiv-internal builds
for the moment (we typically test the native compilers), so I added a comment.
Fixes D36860.
llvm-svn: 311391
Diffstat (limited to 'llvm/lib')
0 files changed, 0 insertions, 0 deletions