[PATCH] D22426: Fix automatic detection of ARM MSVC toolset in clang.exe

Dave Bartolomeo via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 15 18:17:55 PDT 2016


DaveBartolomeo added a comment.

In https://reviews.llvm.org/D22426#486100, @compnerd wrote:

> I imagine that at this point, most usage is still based around the x86 toolchain rather than x64 (I didnt even notice the x64 tools until recently).  That is, any reason that we shouldnt be using x64 for x64, x64_x86 for x86, and x64_arm for ARM?


Most usage is indeed x86-hosted. While the x64-hosted x64-targeting compiler has been available from the beginning of MSVC's x64 support, the x64-hosted x86-targeting toolset is relatively recent (VS 2102 or VS 2013, I think). In general, the x86-hosted compilers are marginally faster than the equivalent x64-hosted compiler, and since x86-hosted has always been the default, most developers don't switch to the x64-hosted toolset unless they run into code that won't compile or link without running out of memory space on the x86-hosted toolset. Also, the x64-hosted toolset won't run on machines running a 32-bit OS, which are more rare these days, but still exist. The existing Clang behavior would have failed on a 32-bit OS when targeting x64, though, so if we've gotten away with it this long, we're probably OK.

One reasonable solution would be to choose the toolset that is hosted on the same architecture as the host of clang.exe (e.g. x64-hosted Clang looks for x64-hosted MSVC). If this sounds good, I can make that change in a follow-up commit.


https://reviews.llvm.org/D22426





More information about the cfe-commits mailing list