chore(axum): add build flag

This commit is contained in:
xfy
2024-09-14 15:55:45 +08:00
parent 2a74778417
commit b01d97242f
2 changed files with 8 additions and 5 deletions

View File

@ -3,6 +3,9 @@ name = "phthonus"
version = "0.1.0" version = "0.1.0"
edition = "2021" edition = "2021"
[build]
rustflags = ["-C", "target-cpu=native"]
[dependencies] [dependencies]
# server # server
axum = "0.7.5" axum = "0.7.5"

View File

@ -38,19 +38,19 @@ lint:
fix: fix:
$(CARGO) fix --allow-dirty --all-features && $(CARGO) fmt $(CARGO) fix --allow-dirty --all-features && $(CARGO) fmt
build-linux-musl: clean-release linux-musl: clean-release
$(CROSS) build --release --target x86_64-unknown-linux-musl $(CROSS) build --release --target x86_64-unknown-linux-musl
build-linux-gnu: clean-release linux-gnu: clean-release
$(CROSS) build --release --target x86_64-unknown-linux-gnu $(CROSS) build --release --target x86_64-unknown-linux-gnu
build-windows-gnu: clean-release windows-gnu: clean-release
$(CROSS) build --release --target x86_64-pc-windows-gnu $(CROSS) build --release --target x86_64-pc-windows-gnu
build-freebsd: clean-release freebsd: clean-release
$(CROSS) build --release --target x86_64-unknown-freebsd $(CROSS) build --release --target x86_64-unknown-freebsd
build-loongarch: clean-release loongarch: clean-release
$(CROSS) build --release --target loongarch64-unknown-linux-gnu $(CROSS) build --release --target loongarch64-unknown-linux-gnu
deps: deps: