Welcome to mirror list, hosted at ThFree Co, Russian Federation.

install-llvm-mono-build.bat « msvc - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 55b443a768f2b2185cba80c112dbb6544869206d (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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
:: --------------------------------------------------
:: Install needed LLVM binaries from LLVM install directory
:: into Mono build output directory.
::
:: %1 LLVM install root directory (internal or external LLVM build).
:: %2 Mono distribution root directory.
:: --------------------------------------------------

@echo off
setlocal

set BUILD_RESULT=1

set LLVM_INSTALL_DIR=%~1
shift
set MONO_DIST_DIR=%~1
shift

if "%LLVM_INSTALL_DIR%" == "" (
    echo Missing LLVM install directory argument.
    goto ECHO_USAGE
)

if "%MONO_DIST_DIR%" == "" (
    echo Missing Mono dist directory argument.
    goto ECHO_USAGE
)

if not exist "%LLVM_INSTALL_DIR%\bin\opt.exe" (
    echo Missing LLVM build output, "%LLVM_INSTALL_DIR%\bin\opt.exe"
    goto ON_ERROR
)

if not exist "%LLVM_INSTALL_DIR%\bin\llc.exe" (
    echo Missing LLVM build output, "%LLVM_INSTALL_DIR%\bin\llc.exe"
    goto ON_ERROR
)

if not exist "%LLVM_INSTALL_DIR%\bin\llvm-dis.exe" (
    echo Missing LLVM build output, "%LLVM_INSTALL_DIR%\bin\llvm-dis.exe"
    goto ON_ERROR
)

if not exist "%LLVM_INSTALL_DIR%\bin\llvm-mc.exe" (
    echo Missing LLVM build output, "%LLVM_INSTALL_DIR%\bin\llvm-mc.exe"
    goto ON_ERROR
)

if not exist "%LLVM_INSTALL_DIR%\bin\llvm-as.exe" (
    echo Missing LLVM build output, "%LLVM_INSTALL_DIR%\bin\llvm-as.exe"
    goto ON_ERROR
)

copy /Y "%LLVM_INSTALL_DIR%\bin\opt.exe" "%MONO_DIST_DIR%" >nul 2>&1
copy /Y "%LLVM_INSTALL_DIR%\bin\llc.exe" "%MONO_DIST_DIR%" >nul 2>&1
copy /Y "%LLVM_INSTALL_DIR%\bin\llvm-dis.exe" "%MONO_DIST_DIR%" >nul 2>&1
copy /Y "%LLVM_INSTALL_DIR%\bin\llvm-mc.exe" "%MONO_DIST_DIR%" >nul 2>&1
copy /Y "%LLVM_INSTALL_DIR%\bin\llvm-as.exe" "%MONO_DIST_DIR%" >nul 2>&1

goto ON_SUCCESS

:ON_SUCCESS

set BUILD_RESULT=0
goto ON_EXIT

:ECHO_USAGE:
    ECHO Usage: install-llvm-mono-build.bat [llvm_install_dir] [mono_dist_dir].

:ON_ERROR
    echo Failed to install LLVM binaries into Mono build output directory.
    goto ON_EXIT

:ON_EXIT
    exit /b %BUILD_RESULT%

@echo on