diff --git a/recipes/core/drivers-initfs/recipe.toml b/recipes/core/drivers-initfs/recipe.toml index 0f6fd6a9760e68d3e76ca6c0d34f4b3d9e8a525c..e1e91f5bbcac09074e0256329ac45a7ceb391983 100644 --- a/recipes/core/drivers-initfs/recipe.toml +++ b/recipes/core/drivers-initfs/recipe.toml @@ -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 +"${COOKBOOK_CARGO}" build --release \ + --manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \ + $(for bin in "${BINS[@]}"; do echo "-p" "${bin}"; done) for bin in "${BINS[@]}" do - "${COOKBOOK_CARGO}" rustc --release \ - --manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \ - -p "${bin}" \ - --bin "${bin}" \ - -- \ - -C opt-level=s \ - -C panic=abort cp -v "target/${TARGET}/release/${bin}" "${COOKBOOK_STAGE}/bin" done diff --git a/recipes/core/drivers/recipe.toml b/recipes/core/drivers/recipe.toml index 076d703e2f44afd456b1ac2eda993907c8b3da55..cccd2729032ac1d48ebc1dd54c0b425194afc5b8 100644 --- a/recipes/core/drivers/recipe.toml +++ b/recipes/core/drivers/recipe.toml @@ -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 +"${COOKBOOK_CARGO}" build --release \ + --manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \ + $(for bin in "${BINS[@]}"; do echo "-p" "${bin}"; done) for bin in "${BINS[@]}" do - "${COOKBOOK_CARGO}" rustc --release \ - --manifest-path "${COOKBOOK_SOURCE}/Cargo.toml" \ - -p "${bin}" \ - --bin "${bin}" \ - -- \ - -C opt-level=s \ - -C panic=abort cp -v "target/${TARGET}/release/${bin}" "${COOKBOOK_STAGE}/bin" done