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