-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathCargo.toml
118 lines (103 loc) · 3.26 KB
/
Cargo.toml
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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
[package]
name = "duskphantom"
version = "0.0.1"
edition = "2021"
default-run = "compiler"
license = "MIT OR Apache-2.0"
[lib]
name = "duskphantom"
path = "src/lib.rs"
# 使用自己编写的前端中端后端
[[bin]]
name = "compiler"
path = "src/main.rs"
# 使用clang作为前端,使用llc作为后端
[[bin]]
name = "compiler-cl"
path = "src/main_clang_llc.rs"
# 使用clang作为前端,自身实现后端
[[bin]]
name = "compiler-cs"
path = "src/main_clang_self.rs"
# 使用自己实现的中端导出llvm ir,使用llc作为后端
[[bin]]
name = "compiler-sc"
path = "src/main_self_llc.rs"
[workspace]
members = ["crates/*"]
[workspace.package]
repository = "https://github.com/dusk-phantom/duskphantom"
license = "MIT OR Apache-2.0"
license-file = "LICENSE"
edition = "2021"
[workspace.dependencies]
anyhow = "1.0.86"
duskphantom = { path = "." }
duskphantom-graph = { version = "0.0.*", path = "crates/duskphantom-graph" }
duskphantom-utils = { version = "0.0.*", path = "crates/duskphantom-utils" }
duskphantom-backend = { path = "crates/duskphantom-backend" }
duskphantom-frontend = { version = "0.0.*", path = "crates/duskphantom-frontend" }
duskphantom-middle = { version = "0.0.*", path = "crates/duskphantom-middle" }
clang-front-back = { version = "0.0.*", path = "crates/clang-front-back" }
rayon = "1.8.0"
llvm-ir = { version = "0.11.1", features = ["llvm-16"] }
rustc-hash = "2.0.0"
lazy_static = "1.4.0"
serde = { version = "1.0.130", features = ["derive"] }
thiserror = { version = "1.0.50" }
insta = "1.39.0"
tempfile = "3.2.0"
serde_yaml = "0.9.30"
rand = "0.8.5"
winnow = "0.6.5"
hexf-parse = "0.2.1"
regex = "1.10.5"
indoc = "2.0.5"
diff = "0.1.13"
typed-arena = "2.0.2"
once_cell = "1.7.2"
criterion = "0.3.0"
z3 = "0.12.1"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
# clang = "2.0.0"
# 使用clap 稳定版
rayon = { workspace = true }
clap = { version = "4.5.0", features = ["derive"] }
lazy_static = { workspace = true }
clang-front-back = { workspace = true }
serde = { workspace = true }
serde_yaml = { workspace = true }
thiserror = { workspace = true }
typed-arena = { workspace = true }
llvm-ir = { workspace = true, optional = true }
tempfile = { workspace = true }
winnow = { workspace = true }
anyhow = { workspace = true }
duskphantom-utils = { workspace = true }
duskphantom-frontend = { workspace = true }
duskphantom-middle = { workspace = true }
duskphantom-backend = { workspace = true }
hexf-parse = { workspace = true }
regex = { workspace = true }
diff = { workspace = true }
rustc-hash = { workspace = true }
[dev-dependencies]
criterion = { workspace = true }
# 特性管理
[features]
default = [
"log_enabled", # 用来指定是否开启日志,提交的时候应该关闭
"backend_opt", # 用来指定是否开启后端优化,提交的时候应该开启
"clang_enabled", # 解除该行注释获取基于clang的前后端, 比赛提交的时候该行需要注释掉
]
clang_enabled = ["llvm-ir"]
gen_virtual_asm = []
backend_opt = ["opt_address_computation"]
opt_address_computation = [] # 该特性用来指定是否开启s0辅助寻址计算优化
log_enabled = []
[profile.release]
lto = true
codegen-units = 1 # 提交参赛代码的时候该行设置为1
strip = true
opt-level = 3