Skip to content

Commit 2c70689

Browse files
committed
fix(ci/run): specify target triple for bindgen-cli installation
1 parent 6a7b0f6 commit 2c70689

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ci/run.bash

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@ cargo -vV
1010
if [ -n "$INSTALL_BINDGEN" ]; then
1111
# Install `cargo-binstall` first for faster installation.
1212
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
13-
cargo binstall -y --force --locked bindgen-cli
13+
# An explicit `--target` is required to ensure that `bindgen-cli` is built for the
14+
# same target as the rest of the toolchain.
15+
# See: <https://github.com/rust-lang/rustup/issues/4396>
16+
cargo binstall -y --force --locked bindgen-cli "--target=$(rustc --print host-tuple)"
1417
mkdir "$CARGO_HOME"/bin/bindgen-cli
1518
mv "$CARGO_HOME"/bin/bindgen "$CARGO_HOME"/bin/bindgen-cli/
1619
export PATH="$CARGO_HOME/bin/bindgen-cli:$PATH"

0 commit comments

Comments
 (0)