forked from codedeliveryservice/Reckless
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
35 lines (29 loc) · 1012 Bytes
/
Makefile
File metadata and controls
35 lines (29 loc) · 1012 Bytes
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
export RUSTFLAGS := -Ctarget-cpu=native
EXE := reckless
TARGET_TUPLE := $(shell rustc --print host-tuple)
ifdef MSYSTEM
NAME := $(EXE).exe
ENV = UNIX
else ifeq ($(OS),Windows_NT)
NAME := $(EXE).exe
ENV = WINDOWS
else
NAME := $(EXE)
ENV := UNIX
endif
ifeq ($(ENV),UNIX)
PGO_MOVE := mv "target/$(TARGET_TUPLE)/release/reckless" "$(NAME)"
else
PGO_MOVE := move /Y "target\$(TARGET_TUPLE)\release\reckless.exe" "$(NAME)"
endif
rule:
cargo rustc --release -- -C target-cpu=native --emit link=$(NAME)
x64-check:
RUSTFLAGS="-C target-cpu=x86-64" cargo check --target x86_64-unknown-linux-gnu --no-default-features
RUSTFLAGS="-C target-cpu=x86-64-v3" cargo check --target x86_64-unknown-linux-gnu --no-default-features
RUSTFLAGS="-C target-cpu=x86-64-v4 -C target-feature=+gfni,+avx512bw,+avx512vl,+avx512vbmi,+avx512vbmi2,+avx512vnni,+avx512bitalg" cargo check --target x86_64-unknown-linux-gnu --no-default-features
pgo:
cargo pgo instrument
cargo pgo run -- bench
cargo pgo optimize
$(PGO_MOVE)