summaryrefslogtreecommitdiff
path: root/build-test.cmd
diff options
context:
space:
mode:
authorjashook <jashoo@microsoft.com>2018-03-05 13:35:19 -0800
committerjashook <jashoo@microsoft.com>2018-03-06 16:21:46 -0800
commit00b9df366d9d0407fb8acb323713287920526b66 (patch)
tree546f72dccf680fe75f12a90458b9b06b78a3e648 /build-test.cmd
parent355995e48e693ae0d0d21db5ba904bb87e0a0c1f (diff)
downloadcoreclr-00b9df366d9d0407fb8acb323713287920526b66.tar.gz
coreclr-00b9df366d9d0407fb8acb323713287920526b66.tar.bz2
coreclr-00b9df366d9d0407fb8acb323713287920526b66.zip
Remove vs2015 build dependencies
Diffstat (limited to 'build-test.cmd')
-rw-r--r--build-test.cmd39
1 files changed, 5 insertions, 34 deletions
diff --git a/build-test.cmd b/build-test.cmd
index 2aa9f4e715..bd03d6f74d 100644
--- a/build-test.cmd
+++ b/build-test.cmd
@@ -7,44 +7,16 @@ set __VCBuildArch=x86_amd64
set __BuildType=Debug
set __BuildOS=Windows_NT
+set "__ProjectDir=%~dp0"
+
:: Define a prefix for most output progress messages that come from this script. That makes
:: it easier to see where these are coming from. Note that there is a trailing space here.
set "__MsgPrefix=BUILDTEST: "
-:: Default to highest Visual Studio version available
-::
-:: For VS2015 (and prior), only a single instance is allowed to be installed on a box
-:: and VS140COMNTOOLS is set as a global environment variable by the installer. This
-:: allows users to locate where the instance of VS2015 is installed.
-::
-:: For VS2017, multiple instances can be installed on the same box SxS and VS150COMNTOOLS
-:: is no longer set as a global environment variable and is instead only set if the user
-:: has launched the VS2017 Developer Command Prompt.
-::
-:: Following this logic, we will default to the VS2017 toolset if VS150COMNTOOLS tools is
-:: set, as this indicates the user is running from the VS2017 Developer Command Prompt and
-:: is already configured to use that toolset. Otherwise, we will fallback to using the VS2015
-:: toolset if it is installed. Finally, we will fail the script if no supported VS instance
-:: can be found.
-if defined VisualStudioVersion (
- if not defined __VSVersion echo %__MsgPrefix%Detected Visual Studio %VisualStudioVersion% developer command ^prompt environment
- goto Run
-)
-
-set _VSWHERE="%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
-if exist %_VSWHERE% (
- for /f "usebackq tokens=*" %%i in (`%_VSWHERE% -latest -prerelease -property installationPath`) do set _VSCOMNTOOLS=%%i\Common7\Tools
-)
-if not exist "%_VSCOMNTOOLS%" set _VSCOMNTOOLS=%VS140COMNTOOLS%
-if not exist "%_VSCOMNTOOLS%" (
- echo %__MsgPrefix%Error: Visual Studio 2015 or 2017 required.
- echo Please see https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/developer-guide.md for build instructions.
- exit /b 1
-)
+call "%__ProjectDir%"\setup_vs_tools.cmd
-call "%_VSCOMNTOOLS%\VsDevCmd.bat"
-
-:Run
+REM setup_vs_tools.cmd will correctly echo error message.
+if NOT '%ERRORLEVEL%' == '0' exit /b 1
if defined VS150COMNTOOLS (
set "__VSToolsRoot=%VS150COMNTOOLS%"
@@ -56,7 +28,6 @@ if defined VS150COMNTOOLS (
set __VSVersion=vs2015
)
-set "__ProjectDir=%~dp0"
:: remove trailing slash
if %__ProjectDir:~-1%==\ set "__ProjectDir=%__ProjectDir:~0,-1%"
set "__TestDir=%__ProjectDir%\tests"