Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add PROFILE_FLAGS to profileable targets #145

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
ifeq ($(origin PROFILE), undefined)
else
PROFILE_FLAGS = -C instrument-coverage
endif

ifeq ($(origin MANIFEST_PATH), undefined)
else
MANIFEST_PATH_ARGS = --manifest-path=${MANIFEST_PATH}
Expand All @@ -23,10 +28,10 @@ audit: ${HOME}/.cargo/bin/cargo-audit
PATH=${HOME}/.cargo/bin:${PATH} cargo audit -D warnings

build:
cargo build
RUSTFLAGS="${DENY} ${PROFILE_FLAGS}" cargo build

build-deprecated:
cargo build --features=deprecated
RUSTFLAGS="${DENY} ${PROFILE_FLAGS}" cargo build --features=deprecated

check-typos:
typos
Expand Down Expand Up @@ -73,10 +78,10 @@ fmt-ci:
cargo fmt -- --check

release:
cargo build --release
RUSTFLAGS="${DENY} ${PROFILE_FLAGS}" cargo build --release

test:
RUST_BACKTRACE=1 cargo test
RUSTFLAGS="${DENY} ${PROFILE_FLAGS}" RUST_BACKTRACE=1 cargo test

.PHONY:
build
Expand Down