summaryrefslogtreecommitdiff
path: root/tests/scripts/build_illink.cmd
blob: 726bd44c10367475d241fea4cad8f5f440d21850 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
@if not defined _echo @echo off
setlocal
set rid=win10-x64

:Arg_Loop
if "%1" == ""          goto ArgsDone
if /i "%1" == "-?"     goto Usage
if /i "%1" == "-h"     goto Usage
if /i "%1" == "-help"  goto Usage
if /i "%1" == "clone"  (set doClone=1&shift&goto Arg_Loop)
if /i "%1" == "x64"    (set rid=win10-x64&shift&goto Arg_Loop)
if /i "%1" == "x86"    (set rid=win10-x86&shift&goto Arg_Loop)

goto Usage

:ArgsDone

if defined doCLone (
    git clone --recursive https://github.com/mono/linker
)

pushd linker\corebuild
call restore.cmd -r %rid%
cd ..\linker
..\corebuild\Tools\dotnetcli\dotnet.exe publish -r %rid% -c netcore_Release
popd

echo Built %cd%\linker\linker\bin\netcore_Release\netcoreapp2.0\%rid%\publish\illink.exe

:Done
exit /b 0

:Usage
echo.
echo.Build ILLINKer for CoreCLR testing
echo.
echo.Usage:
echo     build_illink.cmd [clone] [setenv] [arch]
echo.Where:
echo.-? -h -help: view this message.
echo.clone      : Clone the repository https://github.com/mono/linker
echo.arch       : The architecture to build: x64 (default) or x86
echo.
goto Done