-
Notifications
You must be signed in to change notification settings - Fork 5
/
justfile
32 lines (23 loc) · 1.08 KB
/
justfile
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
export RUST_BACKTRACE := "1"
BASE_RUSTFLAGS := "-C force-frame-pointers=y -L " + absolute_path("") / "target/static-libs"
RUSTFLAGS_STATIC := BASE_RUSTFLAGS + " -C target-feature=+crt-static"
RUSTFLAGS_ASAN := BASE_RUSTFLAGS + " -Zsanitizer=address"
build: build-native-libraries
RUSTFLAGS="{{BASE_RUSTFLAGS}}" cargo build
test: build-native-libraries
RUSTFLAGS="{{BASE_RUSTFLAGS}}" cargo test
clippy:
cargo clippy -- -Dclippy::all
build-release: build-native-libraries
RUSTFLAGS="{{RUSTFLAGS_STATIC}}" cargo build --release --target x86_64-unknown-linux-gnu
xtask: build-native-libraries
RUSTFLAGS="{{BASE_RUSTFLAGS}}" cargo xtask
# Note that the native dependencies are not instrumented.
build-asan: build-native-libraries
RUSTFLAGS="{{RUSTFLAGS_ASAN}}" cargo +nightly build -Zbuild-std --target x86_64-unknown-linux-gnu
test-asan: build-native-libraries
RUSTFLAGS="{{RUSTFLAGS_ASAN}}" cargo +nightly test -Zbuild-std --target x86_64-unknown-linux-gnu
build-native-libraries:
./tools/build_deps
c-fmt:
find src/bpf/ ! -iname vmlinux.h -iname *.h -o -iname *.c | xargs clang-format -i