Skip to content

Commit

Permalink
feat(pipelines/cargo): add support for rustflags (#1698)
Browse files Browse the repository at this point in the history
Signed-off-by: Massimiliano Giovagnoli <massimiliano.giovagnoli@chainguard.dev>
  • Loading branch information
maxgio92 authored Dec 12, 2024
1 parent fa53d52 commit cd52ead
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion pkg/build/pipelines/cargo/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ inputs:
Before building, the cargo pipeline wil cd into this directory. Defaults
to current working directory
rustflags:
default: ""
required: false
description: |
Rustc flags to be passed to pass to all compiler invocations that Cargo performs.
In contrast with cargo rustc, this is useful for passing a flag to all compiler instances.
This string is split by whitespace.
prefix:
default: usr
description: |
Expand All @@ -51,7 +59,7 @@ pipeline:
cd "${{inputs.modroot}}"
# Build and install package(s)
cargo auditable build --target-dir target ${{inputs.opts}}
RUSTFLAGS="${{inputs.rustflags}}" cargo auditable build --target-dir target ${{inputs.opts}}
if [[ ! -z "${{inputs.output}}" ]]; then
install -Dm755 "${OUTPUT_PATH}/${{inputs.output}}" "${INSTALL_PATH}/${{inputs.output}}"
else
Expand Down

0 comments on commit cd52ead

Please sign in to comment.