-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.gradle
84 lines (65 loc) · 1.88 KB
/
build.gradle
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
78
79
80
81
82
83
plugins {
id 'java'
id 'antlr'
id 'application'
id 'groovy'
}
repositories {
// Use jcenter for resolving dependencies.
// You can declare any Maven/Ivy/file repository here.
mavenCentral()
jcenter()
}
String upstreamVersion = '4.5.1'
configurations {
jna
}
installDist {
}
tasks.create(name: 'judge', dependsOn: 'installDist', type: Exec)
tasks.create(name: 'builtin_func', type: Exec)
tasks.create(name: 'generate_llvm', dependsOn: 'run', type: Exec)
judge {
workingDir '/home/yujie6/Documents/Compiler/local-judge'
executable 'python'
args 'judge.py'
}
builtin_func {
workingDir '/home/yujie6/Documents/Compiler/MX-Compiler/src/main/c'
executable '/usr/bin/bash'
args './compile-builtin.sh'
}
generate_llvm {
workingDir '/home/yujie6/Documents/Compiler/MX-Compiler'
executable 'bash'
args './codegen.bash'
}
dependencies {
// antlr package
antlr "org.antlr:antlr4:4.7.1"
compile "org.antlr:antlr4-runtime:4.7.1"
compile "commons-cli:commons-cli:1.3.1"
compile group: 'commons-io', name: 'commons-io', version: '2.6'
// Use JUnit test framework
testImplementation 'junit:junit:4.12'
}
application {
mainClassName = 'Compiler.MXCC'
}
test {
}
check {
}
run {
// args = ["-g" ,"3", "-i", "./src/test/resources/codegen/sorting/bubble_sort.mx", "-o", "/tmp/test.s"]
args = ["-g" ,"3", "-i", "./src/test/resources/optim/maxflow.mx", "-o", "/tmp/test.s"]
// args = ["-g" ,"3", "-i", "./src/test/resources/codegen/t55.mx", "-o", "/tmp/test.s"] // 30
// args = ["-g" ,"3", "-i", "/home/yujie6/Documents/Compiler/LearnLLVM/codegen/t.mx", "-o", "/tmp/test.s"]
// options.warnings = false
}
generateGrammarSource {
println "Generating parset and lexer."
// println sourceSets.main.java.srcDirs
maxHeapSize = "64m"
arguments += ["-visitor", "-long-messages", "-package", "com.antlr"]
}