Fix Windows arm target cross build: detect prerelease VS2017, stay in repo root
authorJacek Blaszczynski <biosciencenow@outlook.com>
Mon, 16 Oct 2017 00:27:03 +0000 (02:27 +0200)
committerJacek Blaszczynski <biosciencenow@outlook.com>
Mon, 16 Oct 2017 00:27:03 +0000 (02:27 +0200)
commitd4a5e032efe65c6b84cb373a8a18d754ad4cf6aa
treefd87142cc964a24a3d40b980d794363a3ad1c445
parent8c7049aabe4bd2d5332a795bfa61a37077ba39bc
Fix Windows arm target cross build: detect prerelease VS2017, stay in repo root

Fixes issue #14514

Arm Windows build was recently changed by adding vswhere based VS installation detection
and earlier initialization of environment variables. For details see
https://github.com/dotnet/coreclr/pull/14228/files#diff-02389dfac0a172ab80211625efc34318R22

This introduced the following problems: (i) inability to detect and use VS 15 preview releses,
(ii) unexpected changes to working directory caused by VsDevCmd.bat script execution. These
errors prevented an arm Windows build on my machine with different errors. In particular due
to presence of arm tools only in preview version of VS the arm build consistently failed with
CMake error "compiler unknown". Fixing of this problem unmasked second bug introduced by
uncontrolled changes to build script working directory resulting in error: "Command line too
long". Both problems are fixed in this PR.

In addition in CrossArchBuild leg a new CMake custom argument is introduced which allows for
selection of latest Windows 10 SDK available on machine directly by CMake. So far this define
was present only in CoreCLR native build leg.
build.cmd