Skip to content

Commit

Permalink
build-style/cargo: produce auditable binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
jcgruenhage committed Nov 1, 2022
1 parent e161a17 commit f4ae30d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions common/build-style/cargo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@
#

do_build() {
: ${make_cmd:=cargo}
: ${make_cmd:=cargo auditable}

${make_cmd} build --release --target ${RUST_TARGET} ${configure_args}
}

do_check() {
: ${make_cmd:=cargo}
: ${make_cmd:=cargo auditable}

${make_check_pre} ${make_cmd} test --release --target ${RUST_TARGET} ${configure_args} \
${make_check_args}
}

do_install() {
: ${make_cmd:=cargo}
: ${make_cmd:=cargo auditable}
: ${make_install_args:=--path .}

${make_cmd} install --target ${RUST_TARGET} --root="${DESTDIR}/usr" \
Expand Down
4 changes: 4 additions & 0 deletions common/environment/build-style/cargo.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
hostmakedepends+=" cargo"

if ! [[ "$pkgname" =~ ^cargo-auditable ]]; then
hostmakedepends+=" cargo-auditable"
fi

if [ "$CROSS_BUILD" ]; then
makedepends+=" rust-std"
fi
Expand Down

0 comments on commit f4ae30d

Please sign in to comment.