summaryrefslogtreecommitdiff
path: root/build.cmd
diff options
context:
space:
mode:
authorBruce Forstall <brucefo@microsoft.com>2017-10-26 13:29:55 -0700
committerBruce Forstall <brucefo@microsoft.com>2017-10-26 13:29:55 -0700
commit52ebf91408fafea70396ca8bf2589c655f6d6bdd (patch)
tree2dc6dea4afddb2f1d0ca0c77b5c6ef20d27dd7cc /build.cmd
parentea3f140da0e9e3bf6ee1f1c9d88a231cf3875a82 (diff)
downloadcoreclr-52ebf91408fafea70396ca8bf2589c655f6d6bdd.tar.gz
coreclr-52ebf91408fafea70396ca8bf2589c655f6d6bdd.tar.bz2
coreclr-52ebf91408fafea70396ca8bf2589c655f6d6bdd.zip
Allow building arm64 using VS2017 tools
VS2017 now includes ARM64 compilers. Change the build scripts so that the normal VC tools path is used for the builds for ARM64. However, if -toolset_dir is passed, then use the specified tools, as before.
Diffstat (limited to 'build.cmd')
-rw-r--r--build.cmd18
1 files changed, 12 insertions, 6 deletions
diff --git a/build.cmd b/build.cmd
index 3a0de8c808..57005b9e1f 100644
--- a/build.cmd
+++ b/build.cmd
@@ -368,10 +368,10 @@ if %__BuildNative% EQU 1 (
echo %__MsgPrefix%Commencing build of native components for %__BuildOS%.%__BuildArch%.%__BuildType%
- set nativePlatfromArgs=-platform=%__BuildArch%
- if /i "%__BuildArch%" == "arm64" ( set nativePlatfromArgs=-useEnv )
+ set __NativePlatformArgs=-platform=%__BuildArch%
+ if not "%__ToolsetDir%" == "" ( set __NativePlatformArgs=-useEnv )
- if /i "%__BuildArch%" == "arm64" (
+ if not "%__ToolsetDir%" == "" (
rem arm64 builds currently use private toolset which has not been released yet
REM TODO, remove once the toolset is open.
call :PrivateToolSet
@@ -387,6 +387,12 @@ if %__BuildNative% EQU 1 (
REM Make CMake pick the highest installed version in the 10.0.* range
set ___SDKVersion="-DCMAKE_SYSTEM_VERSION=10.0"
)
+ if /i "%__BuildArch%" == "arm64" (
+ set __VCBuildArch=x86_arm64
+
+ REM Make CMake pick the highest installed version in the 10.0.* range
+ set ___SDKVersion="-DCMAKE_SYSTEM_VERSION=10.0"
+ )
echo %__MsgPrefix%Using environment: "%__VCToolsRoot%\vcvarsall.bat" !__VCBuildArch!
call "%__VCToolsRoot%\vcvarsall.bat" !__VCBuildArch!
@@ -425,7 +431,7 @@ if %__BuildNative% EQU 1 (
set __MsbuildWrn=/flp1:WarningsOnly;LogFile=!__BuildWrn!
set __MsbuildErr=/flp2:ErrorsOnly;LogFile=!__BuildErr!
- @call %__ProjectDir%\run.cmd build -Project=%__IntermediatesDir%\install.vcxproj -MsBuildLog=!__MsbuildLog! -MsBuildWrn=!__MsbuildWrn! -MsBuildErr=!__MsbuildErr! -configuration=%__BuildType% %nativePlatfromArgs% %__RunArgs% -ExtraParameters="/p:ForceImportBeforeCppTargets=%__ProjectDir%/clr.nativebuild.props /m:2" %__UnprocessedBuildArgs%
+ @call %__ProjectDir%\run.cmd build -Project=%__IntermediatesDir%\install.vcxproj -MsBuildLog=!__MsbuildLog! -MsBuildWrn=!__MsbuildWrn! -MsBuildErr=!__MsbuildErr! -configuration=%__BuildType% %__NativePlatformArgs% %__RunArgs% -ExtraParameters="/p:ForceImportBeforeCppTargets=%__ProjectDir%/clr.nativebuild.props /m:2" %__UnprocessedBuildArgs%
if not !errorlevel! == 0 (
echo %__MsgPrefix%Error: native component build failed. Refer to the build log files for details:
@@ -665,7 +671,7 @@ if %__BuildTests% EQU 1 (
rem arm64 builds currently use private toolset which has not been released yet
REM TODO, remove once the toolset is open.
- if /i "%__BuildArch%" == "arm64" call :PrivateToolSet
+ if not "%__ToolsetDir%" == "" call :PrivateToolSet
set NEXTCMD=call %__ProjectDir%\build-test.cmd %__BuildArch% %__BuildType% %__UnprocessedBuildArgs%
echo %__MsgPrefix%!NEXTCMD!
@@ -839,7 +845,7 @@ exit /b 1
:PrivateToolSet
-echo %__MsgPrefix% Setting Up the usage of __ToolsetDir:%__ToolsetDir%
+echo %__MsgPrefix%Setting up the usage of __ToolsetDir:%__ToolsetDir%
if /i "%__ToolsetDir%" == "" (
echo %__MsgPrefix%Error: A toolset directory is required for the Arm64 Windows build. Use the toolset_dir argument.