Skip to content
Snippets Groups Projects
Commit 036cba52 authored by bjorn3's avatar bjorn3
Browse files

Use cargo env vars to build drivers with opt-level=s and panic=abort

parent 97b5dff9
No related branches found
No related tags found
No related merge requests found
......@@ -47,15 +47,13 @@ case "${TARGET}" in
esac
mkdir -pv "${COOKBOOK_STAGE}/bin"
export CARGO_PROFILE_RELEASE_OPT_LEVEL=s
export CARGO_PROFILE_RELEASE_PANIC=abort
for bin in "${BINS[@]}"
do
"${COOKBOOK_CARGO}" rustc --release \
"${COOKBOOK_CARGO}" build --release \
--manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \
-p "${bin}" \
--bin "${bin}" \
-- \
-C opt-level=s \
-C panic=abort
-p "${bin}"
cp -v "target/${TARGET}/release/${bin}" "${COOKBOOK_STAGE}/bin"
done
......
......@@ -32,15 +32,13 @@ esac
#Build each driver in the list
mkdir -pv "${COOKBOOK_STAGE}/bin"
export CARGO_PROFILE_RELEASE_OPT_LEVEL=s
export CARGO_PROFILE_RELEASE_PANIC=abort
for bin in "${BINS[@]}"
do
"${COOKBOOK_CARGO}" rustc --release \
"${COOKBOOK_CARGO}" build --release \
--manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \
-p "${bin}" \
--bin "${bin}" \
-- \
-C opt-level=s \
-C panic=abort
-p "${bin}"
cp -v "target/${TARGET}/release/${bin}" "${COOKBOOK_STAGE}/bin"
done
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment