Skip to content

Commit bcbb043

Browse files
committed
ci: workaround RUSTFLAGS leaking into cargo-make rust-script builds
Unset RUSTFLAGS for the cargo-make step in build.yaml to prevent -D warnings from leaking into rust-script compilation of wdk-build. Only cargo-make is affected since it uses rust-script to compile inline build scripts where wdk-build is a path dependency (via symlink), bypassing cargo's --cap-lints. cargo-wdk and cargo install are normal cargo operations with proper --cap-lints handling and do not need this workaround. Temporary workaround until microsoft/windows-drivers-rs#629 is merged and a new wdk-build is published. Tracked in ADO Bug #5396440.
1 parent de907c7 commit bcbb043

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/build.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,13 @@ jobs:
107107
tool: cargo-make
108108

109109
- name: Build and Package Sample Drivers
110-
run: cargo make default +${{ matrix.rust_toolchain }} --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple.name }}
110+
# Unset RUSTFLAGS for cargo-make to work around RUSTFLAGS leaking into
111+
# rust-script compilation of wdk-build (path dep via symlink defeats
112+
# --cap-lints). Upstream fix: microsoft/windows-drivers-rs#629
113+
run: |
114+
$env:RUSTFLAGS = $null
115+
cargo make default +${{ matrix.rust_toolchain }} --locked --profile ${{ matrix.cargo_profile }} --target ${{ matrix.target_triple.name }}
116+
shell: pwsh
111117

112118
# Steps to use cargo-wdk to build and package drivers
113119
- name: Install cargo-wdk binary

0 commit comments

Comments
 (0)