-
Notifications
You must be signed in to change notification settings - Fork 2
/
cleanBuildAll
62 lines (45 loc) · 2.57 KB
/
cleanBuildAll
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
@default dotnetCompiler csc
@windows @default dotnetLoader ""
@notwindows @default dotnetLoader "mono"
@default dCompiler ldmd2
@notwindows @default wget wget
@notwindows @default unzip unzip
@windows @default 7z 7z
@windows @set libext .lib
@notwindows @set libext .a
@rm out
# download dependencies (i.e. DerelictUtil)
rund minish.d downloadDeps
# build the ClrBridge.dll .NET library
rund minish.d buildClrBridge dotnetCompiler=${dotnetCompiler} dotnetLoader=${dotnetLoader}
# at this point, dlang/noCodegenExample.d should work. this program uses
# ClrBridge.dll to call into .NET code, but doesn't require any generated code
# for some reason, this fails on windows without the "-g" option
rund -g --compiler=${dCompiler} dlang/noCodegenExample.d
# build the ClrBridgeCodgen.exe .NET executable
# this tool will take an assembly and generate D code to easily call into it
rund minish.d buildClrBridgeCodegen dotnetCompiler=${dotnetCompiler}
rund minish.d dlang/runPartialUnitTests dotnetCompiler=${dotnetCompiler} dotnetLoader=${dotnetLoader} dCompiler=${dCompiler}
# invoke ClrBridgeCodegen.exe to generate D wrapper code for common .NET libraries
rund minish.d dlang/generateFullDWrappers dotnetCompiler=${dotnetCompiler} dotnetLoader=${dotnetLoader}
rund minish.d dlang/compileFullDWrappers dCompiler=${dCompiler}
rund minish.d dlang/runFullUnitTests dotnetCompiler=${dotnetCompiler} dotnetLoader=${dotnetLoader} dCompiler=${dCompiler}
# execute the example that uses the code from generateDWrappers
# rund dlang/example.d (use this when rund supports -i=-mscorlib and windows/linux library extensions)
rund -i=-mscorlib out/codegen/dlang/mscorlib${libext} --compiler=${dCompiler} dlang/example.d
# build the ClrCallbackHost.exe .NET executable
rund minish.d buildClrCallbackHost dotnetCompiler=${dotnetCompiler} dotnetLoader=${dotnetLoader}
# run the callbackHostExample
rund minish.d dlang/runCallbackHostExample dotnetLoader=${dotnetLoader} dCompiler=${dCompiler}
# run coreclr host tests
# rund test/coreclrhostdriver.d (use this when rund supports -i=-mscorlib and windows/linux library extensions)
rund -i=-mscorlib out/codegen/dlang/mscorlib${libext} --compiler=${dCompiler} test/coreclrhostdriver.d
# run callback host tests
rund minish.d runCallbackHostTests dotnetLoader=${dotnetLoader} dCompiler=${dCompiler}
#
# The AssemblyPatcher Tool
#
@notwindows @set downloadCecilArgs "wget=${wget} unzip=${unzip}"
@windows @set downloadCecilArgs 7z=${7z}
rund minish.d assemblypatcher/downloadCecil ${downloadCecilArgs}
rund minish.d assemblypatcher/build dotnetCompiler=${dotnetCompiler}