Allow user to zip tests even when not building against packages
[platform/upstream/coreclr.git] / build-test.cmd
1 @if not defined _echo @echo off
2 setlocal EnableDelayedExpansion
3
4 :: Set the default arguments for build
5 set __BuildArch=x64
6 set __VCBuildArch=x86_amd64
7 set __BuildType=Debug
8 set __BuildOS=Windows_NT
9 set __VSVersion=vs2015
10 set __VSToolsRoot=%VS140COMNTOOLS%
11
12 :: Define a prefix for most output progress messages that come from this script. That makes
13 :: it easier to see where these are coming from. Note that there is a trailing space here.
14 set __MsgPrefix=BUILDTEST: 
15
16 set "__ProjectDir=%~dp0"
17 :: remove trailing slash
18 if %__ProjectDir:~-1%==\ set "__ProjectDir=%__ProjectDir:~0,-1%"
19 set "__TestDir=%__ProjectDir%\tests"
20 set "__ProjectFilesDir=%__TestDir%"
21 set "__SourceDir=%__ProjectDir%\src"
22 set "__PackagesDir=%__ProjectDir%\packages"
23 set "__RootBinDir=%__ProjectDir%\bin"
24 set "__LogsDir=%__RootBinDir%\Logs"
25
26 :: Default __Exclude to issues.targets
27 set __Exclude=%__TestDir%\issues.targets
28
29 REM __unprocessedBuildArgs are args that we pass to msbuild (e.g. /p:__BuildArch=x64)
30 set "__args= %*"
31 set processedArgs=
32 set __unprocessedBuildArgs=
33 set __RunArgs=
34 set __BuildAgainstPackagesArg=
35 set __RuntimeId=
36 set __ZipTests=
37
38 :Arg_Loop
39 if "%1" == "" goto ArgsDone
40
41 if /i "%1" == "-?"    goto Usage
42 if /i "%1" == "-h"    goto Usage
43 if /i "%1" == "-help" goto Usage
44
45 if /i "%1" == "x64"                   (set __BuildArch=x64&set __VCBuildArch=x86_amd64&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
46 if /i "%1" == "x86"                   (set __BuildArch=x86&set __VCBuildArch=x86&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
47 if /i "%1" == "arm"                   (set __BuildArch=arm&set __VCBuildArch=x86_arm&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
48 if /i "%1" == "arm64"                 (set __BuildArch=arm64&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
49
50 if /i "%1" == "debug"                 (set __BuildType=Debug&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
51 if /i "%1" == "release"               (set __BuildType=Release&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
52 if /i "%1" == "checked"               (set __BuildType=Checked&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
53
54 if /i "%1" == "skipmanaged"           (set __SkipManaged=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
55 if /i "%1" == "updateinvalidpackages" (set __UpdateInvalidPackagesArg=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
56 if /i "%1" == "toolset_dir"           (set __ToolsetDir=%2&set __PassThroughArgs=%__PassThroughArgs% %2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop)
57 if /i "%1" == "buildagainstpackages"  (set __ZipTests=1&set __BuildAgainstPackagesArg=-BuildTestsAgainstPackages&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
58 if /i "%1" == "ziptests"              (set __ZipTests=1&set processedArgs=!processedArgs! %1&shift&goto Arg_Loop)
59 if /i "%1" == "runtimeid"             (set __RuntimeId=%2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop)
60 if /i "%1" == "Exclude"               (set __Exclude=%2&set processedArgs=!processedArgs! %1 %2&shift&shift&goto Arg_Loop)
61
62 if [!processedArgs!]==[] (
63   call set __UnprocessedBuildArgs=!__args!
64 ) else (
65   call set __UnprocessedBuildArgs=%%__args:*!processedArgs!=%%
66 )
67
68 :ArgsDone
69
70 echo %__MsgPrefix%Using environment: "%__VSToolsRoot%\VsDevCmd.bat"
71 call                                 "%__VSToolsRoot%\VsDevCmd.bat"
72
73 set __RunArgs=-BuildOS=%__BuildOS% -BuildType=%__BuildType% -BuildArch=%__BuildArch%
74
75 rem arm64 builds currently use private toolset which has not been released yet
76 REM TODO, remove once the toolset is open.
77 if /i "%__BuildArch%" == "arm64" call :PrivateToolSet
78
79 echo %__MsgPrefix%Commencing CoreCLR repo test build
80
81 set "__BinDir=%__RootBinDir%\Product\%__BuildOS%.%__BuildArch%.%__BuildType%"
82 set "__TestRootDir=%__RootBinDir%\tests"
83 set "__TestBinDir=%__TestRootDir%\%__BuildOS%.%__BuildArch%.%__BuildType%"
84 :: We have different managed and native intermediate dirs because the managed bits will include
85 :: the configuration information deeper in the intermediates path.
86 :: These variables are used by the msbuild project files.
87
88 if not defined __TestIntermediateDir (
89     set "__TestIntermediateDir=tests\obj\%__BuildOS%.%__BuildArch%.%__BuildType%"
90 )
91 set "__NativeTestIntermediatesDir=%__RootBinDir%\%__TestIntermediateDir%\Native"
92 set "__ManagedTestIntermediatesDir=%__RootBinDir%\%__TestIntermediateDir%\Managed"
93
94 :: Generate path to be set for CMAKE_INSTALL_PREFIX to contain forward slash
95 set "__CMakeBinDir=%__TestBinDir%"
96 set "__CMakeBinDir=%__CMakeBinDir:\=/%"
97
98 if not exist "%__TestBinDir%"                   md "%__TestBinDir%"
99 if not exist "%__NativeTestIntermediatesDir%"   md "%__NativeTestIntermediatesDir%"
100 if not exist "%__ManagedTestIntermediatesDir%"  md "%__ManagedTestIntermediatesDir%"
101 if not exist "%__LogsDir%"                      md "%__LogsDir%"
102
103 echo %__MsgPrefix%Checking prerequisites
104
105 :: Eval the output from probe-win1.ps1
106 for /f "delims=" %%a in ('powershell -NoProfile -ExecutionPolicy ByPass "& ""%__SourceDir%\pal\tools\probe-win.ps1"""') do %%a
107
108 REM =========================================================================================
109 REM ===
110 REM === Restore Build Tools
111 REM ===
112 REM =========================================================================================
113 call "%__ProjectDir%\init-tools.cmd"
114
115 REM =========================================================================================
116 REM ===
117 REM === Resolve runtime dependences
118 REM ===
119 REM =========================================================================================
120 call "%__TestDir%\setup-runtime-dependencies.cmd" /arch %__BuildArch% /outputdir %__BinDir%
121
122 if defined __UpdateInvalidPackagesArg (
123   goto skipnative
124 )
125
126 REM =========================================================================================
127 REM ===
128 REM === Native test build section
129 REM ===
130 REM =========================================================================================
131
132 echo %__MsgPrefix%Commencing build of native test components for %__BuildArch%/%__BuildType%
133
134 if defined __ToolsetDir (
135  echo %__MsgPrefix%ToolsetDir is defined to be :%__ToolsetDir%
136  goto GenVSSolution :: Private ToolSet is Defined
137 )
138
139 :: Set the environment for the native build
140 echo %__MsgPrefix%Using environment: "%__VSToolsRoot%\..\..\VC\vcvarsall.bat" %__VCBuildArch%
141 call                                 "%__VSToolsRoot%\..\..\VC\vcvarsall.bat" %__VCBuildArch%
142 @if defined _echo @echo on
143
144 if not defined VSINSTALLDIR (
145     echo %__MsgPrefix%Error: VSINSTALLDIR variable not defined.
146     exit /b 1
147 )
148 if not exist "%VSINSTALLDIR%DIA SDK" goto NoDIA
149
150 :GenVSSolution
151
152 pushd "%__NativeTestIntermediatesDir%"
153 call "%__SourceDir%\pal\tools\gen-buildsys-win.bat" ""%__ProjectFilesDir%"" %__VSVersion% %__BuildArch%
154 @if defined _echo @echo on
155 popd
156
157 if not exist "%__NativeTestIntermediatesDir%\install.vcxproj" (
158     echo %__MsgPrefix%Failed to generate test native component build project!
159     exit /b 1
160 )
161
162 set __msbuildNativeArgs=-configuration=%__BuildType%
163
164 if defined __ToolsetDir (
165     set __msbuildNativeArgs=%__msbuildNativeArgs% -UseEnv
166 ) else (
167     set __msbuildNativeArgs=%__msbuildNativeArgs% -platform=%__BuildArch%
168 )
169
170 set __BuildLogRootName=Tests_Native
171 set __BuildLog=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.log
172 set __BuildWrn=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.wrn
173 set __BuildErr=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.err
174 set __msbuildLog=/flp:Verbosity=normal;LogFile="%__BuildLog%"
175 set __msbuildWrn=/flp1:WarningsOnly;LogFile="%__BuildWrn%"
176 set __msbuildErr=/flp2:ErrorsOnly;LogFile="%__BuildErr%"
177
178 call "%__ProjectDir%\run.cmd" build -Project="%__NativeTestIntermediatesDir%\install.vcxproj" -MsBuildLog=!__msbuildLog! -MsBuildWrn=!__msbuildWrn! -MsBuildErr=!__msbuildErr! %__msbuildNativeArgs% %__RunArgs% %__unprocessedBuildArgs%
179 if errorlevel 1 (
180     echo %__MsgPrefix%Error: build failed. Refer to the build log files for details:
181     echo     %__BuildLog%
182     echo     %__BuildWrn%
183     echo     %__BuildErr%
184     exit /b 1
185 )
186
187 :skipnative
188
189 set __BuildLogRootName=Restore_Product
190 set __BuildLog=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.log
191 set __BuildWrn=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.wrn
192 set __BuildErr=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.err
193 set __msbuildLog=/flp:Verbosity=normal;LogFile="%__BuildLog%"
194 set __msbuildWrn=/flp1:WarningsOnly;LogFile="%__BuildWrn%"
195 set __msbuildErr=/flp2:ErrorsOnly;LogFile="%__BuildErr%"
196
197 set "__TestWorkingDir=%__RootBinDir%\tests\%__BuildOS%.%__BuildArch%.%__BuildType%"
198
199 if not defined __BuildAgainstPackagesArg goto SkipRestoreProduct
200 REM =========================================================================================
201 REM ===
202 REM === Restore product binaries from packages
203 REM ===
204 REM =========================================================================================
205
206 if not defined XunitTestBinBase       set  XunitTestBinBase=%__TestWorkingDir%
207 set "CORE_ROOT=%XunitTestBinBase%\Tests\Core_Root"
208 set "CORE_OVERLAY=%XunitTestBinBase%\Tests\Core_Root_%__RuntimeId%"
209
210 call "%__ProjectDir%\run.cmd" build -Project=%__ProjectDir%\tests\build.proj  -UpdateDependencies -BatchRestorePackages -MsBuildLog=!__msbuildLog! -MsBuildWrn=!__msbuildWrn! -MsBuildErr=!__msbuildErr! %__RunArgs% %__BuildAgainstPackagesArg% %__unprocessedBuildArgs%
211
212 set __BuildLogRootName=Tests_GenerateRuntimeLayout
213
214 call "%__ProjectDir%\run.cmd" build -Project=%__ProjectDir%\tests\runtest.proj -BinPlaceRef -BinPlaceProduct -CopyCrossgenToProduct -MsBuildLog=!__msbuildLog! -MsBuildWrn=!__msbuildWrn! -MsBuildErr=!__msbuildErr! %__RunArgs% %__BuildAgainstPackagesArg% %__unprocessedBuildArgs%
215 if errorlevel 1 (
216     echo BinPlace of mscorlib.dll failed
217     exit /b 1
218 )
219
220 if defined __RuntimeId (
221
222     if not exist %__PackagesDir%\TestNativeBins (
223         echo %__MsgPrefix%Error: Ensure you have run sync.cmd -ab before building a non-Windows test overlay against packages
224         exit /b 1
225     )
226
227     call "%__ProjectDir%\run.cmd" build -Project=%__ProjectDir%\tests\runtest.proj -CreateNonWindowsTestOverlay -RuntimeId="%__RuntimeId%"  -MsBuildLog=!__msbuildLog! -MsBuildWrn=!__msbuildWrn! -MsBuildErr=!__msbuildErr! %__RunArgs% %__BuildAgainstPackagesArg% %__unprocessedBuildArgs%
228     for /R %__PackagesDir%\TestNativeBins\%__RuntimeId%\%__BuildType% %%f in (*.so) do copy %%f %Core_Overlay%
229     for /R %__PackagesDir%\TestNativeBins\%__RuntimeId%\%__BuildType% %%f in (*.dylib) do copy %%f %Core_Overlay%
230
231     echo %__MsgPrefix% Created the runtime layout for %__RuntimeId% in %CORE_OVERLAY%
232 )
233
234 echo %__MsgPrefix% Restored CoreCLR product from packages
235
236 :SkipRestoreProduct
237
238 if defined __SkipManaged exit /b 0
239
240 set __BuildLogRootName=Tests_Managed
241 set __BuildLog=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.log
242 set __BuildWrn=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.wrn
243 set __BuildErr=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.err
244 set __msbuildLog=/flp:Verbosity=normal;LogFile="%__BuildLog%"
245 set __msbuildWrn=/flp1:WarningsOnly;LogFile="%__BuildWrn%"
246 set __msbuildErr=/flp2:ErrorsOnly;LogFile="%__BuildErr%"
247
248 REM =========================================================================================
249 REM ===
250 REM === Managed test build section
251 REM ===
252 REM =========================================================================================
253
254 echo %__MsgPrefix%Starting the Managed Tests Build
255
256 if not defined VSINSTALLDIR (
257     echo %__MsgPrefix%Error: buildtest.cmd should be run from a Visual Studio Command Prompt.  Please see https://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/developer-guide.md for build instructions.
258     exit /b 1
259 )
260
261 if defined __UpdateInvalidPackagesArg (
262   set __up=-updateinvalidpackageversions
263 )
264
265 call "%__ProjectDir%\run.cmd" build -Project=%__ProjectDir%\tests\build.proj -MsBuildLog=!__msbuildLog! -MsBuildWrn=!__msbuildWrn! -MsBuildErr=!__msbuildErr! %__up% %__RunArgs% %__BuildAgainstPackagesArg% %__unprocessedBuildArgs%
266 if errorlevel 1 (
267     echo %__MsgPrefix%Error: build failed. Refer to the build log files for details:
268     echo     %__BuildLog%
269     echo     %__BuildWrn%
270     echo     %__BuildErr%
271     exit /b 1
272 )
273
274 REM Prepare the Test Drop
275 REM Cleans any NI from the last run
276 powershell "Get-ChildItem -path %__TestWorkingDir% -Include '*.ni.*' -Recurse -Force | Remove-Item -force"
277 REM Cleans up any lock folder used for synchronization from last run
278 powershell "Get-ChildItem -path %__TestWorkingDir% -Include 'lock' -Recurse -Force |  where {$_.Attributes -eq 'Directory'}| Remove-Item -force -Recurse"
279
280 set CORE_ROOT=%__TestBinDir%\Tests\Core_Root
281 if exist "%CORE_ROOT%" rd /s /q "%CORE_ROOT%"
282 md "%CORE_ROOT%"
283 xcopy /s "%__BinDir%" "%CORE_ROOT%"
284
285 echo %__MsgPrefix%Creating test wrappers...
286
287 set RuntimeIdArg=
288
289 if defined __RuntimeId (
290     set RuntimeIdArg=-RuntimeID="%__RuntimeId%"
291 )
292
293 set __BuildLogRootName=Tests_XunitWrapper
294 set __BuildLog=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.log
295 set __BuildWrn=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.wrn
296 set __BuildErr=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.err
297 set __msbuildLog=/flp:Verbosity=diag;LogFile="%__BuildLog%"
298 set __msbuildWrn=/flp1:WarningsOnly;LogFile="%__BuildWrn%"
299 set __msbuildErr=/flp2:ErrorsOnly;LogFile="%__BuildErr%"
300
301 call %__ProjectDir%\run.cmd build -Project=%__ProjectDir%\tests\runtest.proj -BuildWrappers -MsBuildEventLogging=" " -MsBuildLog=!__msbuildLog! -MsBuildWrn=!__msbuildWrn! -MsBuildErr=!__msbuildErr! %__RunArgs% %__BuildAgainstPackagesArg% %__unprocessedBuildArgs% %RuntimeIdArg%
302 if errorlevel 1 (
303     echo Xunit Wrapper build failed
304     exit /b 1
305 )
306
307 echo %__MsgPrefix%Creating test overlay...
308
309 set __BuildLogRootName=Tests_Overlay_Managed
310 set __BuildLog=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.log
311 set __BuildWrn=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.wrn
312 set __BuildErr=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.err
313 set __msbuildLog=/flp:Verbosity=normal;LogFile="%__BuildLog%"
314 set __msbuildWrn=/flp1:WarningsOnly;LogFile="%__BuildWrn%"
315 set __msbuildErr=/flp2:ErrorsOnly;LogFile="%__BuildErr%"
316
317 call %__ProjectDir%\run.cmd build -Project=%__ProjectDir%\tests\runtest.proj -testOverlay -MsBuildLog=!__msbuildLog! -MsBuildWrn=!__msbuildWrn! -MsBuildErr=!__msbuildErr! %__RunArgs% %__unprocessedBuildArgs%
318 if errorlevel 1 (
319     echo %__MsgPrefix%Error: build failed. Refer to the build log files for details:
320     echo     %__BuildLog%
321     echo     %__BuildWrn%
322     echo     %__BuildErr%
323     exit /b 1
324 )
325
326 if not defined __ZipTests goto SkipPrepForPublish
327
328 set __BuildLogRootName=Helix_Prep
329 set __BuildLog=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.log
330 set __BuildWrn=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.wrn
331 set __BuildErr=%__LogsDir%\%__BuildLogRootName%_%__BuildOS%__%__BuildArch%__%__BuildType%.err
332 set __msbuildLog=/flp:Verbosity=normal;LogFile="%__BuildLog%"
333 set __msbuildWrn=/flp1:WarningsOnly;LogFile="%__BuildWrn%"
334 set __msbuildErr=/flp2:ErrorsOnly;LogFile="%__BuildErr%"
335
336 REM =========================================================================================
337 REM ===
338 REM === Prep test binaries for Helix publishing
339 REM ===
340 REM =========================================================================================
341
342 call %__ProjectDir%\run.cmd build -Project=%__ProjectDir%\tests\helixprep.proj  -MsBuildLog=!__msbuildLog! -MsBuildWrn=!__msbuildWrn! -MsBuildErr=!__msbuildErr! %__RunArgs% %__BuildAgainstPackagesArg% %__unprocessedBuildArgs% %RuntimeIdArg%
343
344 echo %__MsgPrefix% Prepped test binaries for publishing
345
346 :SkipPrepForPublish
347
348 REM =========================================================================================
349 REM ===
350 REM === All builds complete!
351 REM ===
352 REM =========================================================================================
353
354 echo %__MsgPrefix%Test build successful.
355 echo %__MsgPrefix%Test binaries are available at !__TestBinDir!
356 exit /b 0
357
358 :Usage
359 echo.
360 echo Usage:
361 echo     %0 [option1] [option2] ...
362 echo All arguments are optional. Options are case-insensitive. The options are:
363 echo.
364 echo. -? -h -help: view this message.
365 echo Build architecture: -buildArch: only x64 is currently allowed ^(default: x64^).
366 echo Build type: -buildType: one of Debug, Checked, Release ^(default: Debug^).
367 echo updateinvalidpackageversions: Runs the target to update package versions.
368 echo buildagainstpackages: builds tests against restored packages, instead of against a built product.
369 echo runtimeid ^<ID^>: Builds a test overlay for the specified OS (Only supported when building against packages). Supported IDs are:
370 echo     alpine.3.4.3-x64: Builds overlay for Alpine 3.4.3
371 echo     debian.8-x64: Builds overlay for Debian 8
372 echo     fedora.23-x64: Builds overlay for Fedora 23
373 echo     fedora.24-x64: Builds overlay for Fedora 23
374 echo     opensuse.42.1-x64: Builds overlay for OpenSUSE 42.1
375 echo     osx.10.10-x64: Builds overlay for OSX 10.10
376 echo     rhel.7-x64: Builds overlay for RHEL 7 or CentOS
377 echo     ubuntu.14.04-x64: Builds overlay for Ubuntu 14.04
378 echo     ubuntu.16.04-x64: Builds overlay for Ubuntu 16.04
379 echo     ubuntu.16.10-x64: Builds overlay for Ubuntu 16.10
380 echo ziptests: zips CoreCLR tests & Core_Root for a Helix run
381 echo Exclude- Optional parameter - specify location of default exclusion file (defaults to tests\issues.targets if not specified)
382 echo     Set to "" to disable default exclusion file.
383 echo -- ... : all arguments following this tag will be passed directly to msbuild.
384 echo -priority=^<N^> : specify a set of test that will be built and run, with priority N.
385 echo     0: Build only priority 0 cases as essential testcases (default)
386 echo     1: Build all tests with priority 0 and 1
387 echo     666: Build all tests with priority 0, 1 ... 666
388 echo -sequential: force a non-parallel build ^(default is to build in parallel
389 echo     using all processors^).
390 echo -ilasmroundtrip: enables ilasm round trip build and run of the tests before executing them.
391 echo -verbose: enables detailed file logging for the msbuild tasks into the msbuild log file.
392 exit /b 1
393
394 :NoDIA
395 echo Error: DIA SDK is missing at "%VSINSTALLDIR%DIA SDK". ^
396 This is due to a bug in the Visual Studio installer. It does not install DIA SDK at "%VSINSTALLDIR%" but rather ^
397 at the install location of previous Visual Studio version. The workaround is to copy the DIA SDK folder from the Visual Studio install location ^
398 of the previous version to "%VSINSTALLDIR%" and then build.
399 :: DIA SDK not included in Express editions
400 echo Visual Studio 2013 Express does not include the DIA SDK. ^
401 You need Visual Studio 2013+ (Community is free).
402 echo See: https://github.com/dotnet/coreclr/blob/master/Documentation/project-docs/developer-guide.md#prerequisites
403 exit /b 1
404
405
406 :PrivateToolSet
407
408 echo %__MsgPrefix% Setting Up the usage of __ToolsetDir:%__ToolsetDir%
409
410 if /i "%__ToolsetDir%" == "" (
411     echo %__MsgPrefix%Error: A toolset directory is required for the Arm64 Windows build. Use the toolset_dir argument.
412     exit /b 1
413 )
414
415 set PATH=%__ToolsetDir%\VC_sdk\bin;%PATH%
416 set LIB=%__ToolsetDir%\VC_sdk\lib\arm64;%__ToolsetDir%\sdpublic\sdk\lib\arm64
417 set INCLUDE=^
418 %__ToolsetDir%\VC_sdk\inc;^
419 %__ToolsetDir%\sdpublic\sdk\inc;^
420 %__ToolsetDir%\sdpublic\shared\inc;^
421 %__ToolsetDir%\sdpublic\shared\inc\minwin;^
422 %__ToolsetDir%\sdpublic\sdk\inc\ucrt;^
423 %__ToolsetDir%\sdpublic\sdk\inc\minwin;^
424 %__ToolsetDir%\sdpublic\sdk\inc\mincore;^
425 %__ToolsetDir%\sdpublic\sdk\inc\abi;^
426 %__ToolsetDir%\sdpublic\sdk\inc\clientcore;^
427 %__ToolsetDir%\diasdk\include
428 exit /b 0