-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathMakefile
More file actions
121 lines (95 loc) · 2.96 KB
/
Makefile
File metadata and controls
121 lines (95 loc) · 2.96 KB
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
119
120
121
.PHONY: \
install \
install-bin \
install-npm \
install-wasm \
install-llvm-builder \
install-llvm \
install-revive-runner \
format \
clippy \
doc \
book \
machete \
test \
test-integration \
test-resolc \
test-yul \
test-workspace \
test-wasm \
test-llvm-builder \
test-book \
bench \
bench-pvm \
bench-evm \
bench-resolc \
bench-yul \
clean
install: install-bin install-npm
install-bin:
cargo install --force --locked --path crates/resolc
install-npm:
npm install && npm fund
install-wasm: install-npm
cargo build --target wasm32-unknown-emscripten -p resolc --release --no-default-features
npm run build:package
install-llvm-builder:
cargo install --force --locked --path crates/llvm-builder
install-llvm: install-llvm-builder
git submodule update --init --recursive --depth 1
revive-llvm build --llvm-projects lld --llvm-projects clang
install-revive-runner:
cargo install --locked --force --path crates/runner --no-default-features
format:
cargo fmt --all --check
clippy:
cargo clippy --all-features --workspace --tests --benches -- --deny warnings
doc:
cargo doc --all-features --workspace --document-private-items --no-deps
book: test-book
mdbook serve book --open
machete:
cargo install cargo-machete
cargo machete
test: format clippy machete test-workspace install-revive-runner doc test-book
test-integration: install-bin
cargo test --package revive-integration
test-resolc: install
cargo test --package resolc --all-targets
test-yul:
cargo test --package revive-yul --all-targets
test-workspace: install
cargo test --workspace --all-targets --exclude revive-llvm-builder
test-wasm: install-wasm
npm run test:wasm
test-llvm-builder:
@echo "warning: the llvm-builder tests will take many hours"
cargo test --package revive-llvm-builder -- --test-threads=1
test-book:
cargo install mdbook --version 0.5.1 --locked
mdbook test book
bench: install-bin
cargo criterion --all --all-features --message-format=json \
| criterion-table > crates/benchmarks/BENCHMARKS.md
bench-pvm: install-bin
cargo criterion --bench execute --features bench-pvm-interpreter --message-format=json \
| criterion-table > crates/benchmarks/PVM.md
bench-evm: install-bin
cargo criterion --bench execute --features bench-evm --message-format=json \
| criterion-table > crates/benchmarks/EVM.md
bench-resolc: test-resolc
cargo criterion --package resolc --bench compile --message-format=json \
| criterion-table > crates/resolc/BENCHMARKS_M4PRO.md
bench-yul: test-yul
cargo criterion --package revive-benchmarks --bench parse --message-format=json \
| criterion-table > crates/benchmarks/BENCHMARKS_PARSE_M4PRO.md
cargo criterion --package revive-benchmarks --bench lower --message-format=json \
| criterion-table > crates/benchmarks/BENCHMARKS_LOWER_M4PRO.md
clean:
cargo clean ; \
revive-llvm clean ; \
rm -rf node_modules ; \
rm -rf crates/resolc/src/tests/cli/artifacts ; \
cargo uninstall resolc ; \
cargo uninstall revive-llvm-builder ;
mdbook clean book