[build2] Using build2 with clang 6 (trunk) on windows

Boris Kolpackov boris at codesynthesis.com
Tue Dec 5 14:33:28 UTC 2017


Username I Wanted Was Already Taken <usernameiwantedwasalreadytaken at gmail.com> writes:

> This worked. The program compiled, but the executable produced does not
> have a ".exe" extension. If I manually rename "hello" to "hello.exe", it
> works.

Could you re-build it with -V and send the output?


> If we are to assume that (which sounds reasonable), build2 can check the
> environment for the specific version of the MSVC runtime that is loaded.
> There is still no guarantee that Clang will use this runtime (since the
> user may have more than one version of MSVC installed in his machine), but
> I think this is better than nothing.
> 
> For example, in my setup the following environment variables are defined
> when running from a development command line:
> 
> VS150COMNTOOLS=C:\Program Files (x86)\Microsoft Visual
> Studio\2017\Community\Common7\Tools\
> VSCMD_ARG_app_plat=Desktop
> VSCMD_ARG_HOST_ARCH=x64
> VSCMD_ARG_TGT_ARCH=x64
> VSCMD_VER=15.4.5
> VSINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\

None of these values indicate the runtime being used. There can actually
be multiple (versions of) toolchains installed in a single VSINSTALLDIR.
Which one Clang is using is anyone's guess.

I think this value should come from the compiler. It may make sense to
ask on cfe-dev if there is any way to query it (along with the MSVC and
SDK bin directories). Failed that, the approach that's based on analyzing
the header search paths I suggested earlier will have to do.

Boris



More information about the users mailing list