File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+
3+ # Copyright 2022 Contributors to the Parsec project.
4+ # SPDX-License-Identifier: Apache-2.0
5+
6+ set -xeuf -o pipefail
7+
8+ targets=" aarch64-unknown-linux-gnu arm-unknown-linux-gnueabi i686-unknown-linux-gnu powerpc64-unknown-linux-gnu x86_64-unknown-linux-gnu x86_64-apple-darwin aarch64-apple-darwin"
9+ TARGET_INSTALLED=
10+
11+ for target in $targets ; do
12+
13+ # Check if the target is already installed
14+ if ! rustup target list | grep -q " $target (installed)" ; then
15+ rustup target install $target
16+ TARGET_INSTALLED=" $target "
17+ fi
18+
19+ cargo build --target $target --features generate-bindings
20+ find ../target/$target / -name pkcs11_bindings.rs | xargs -I ' {}' cp ' {}' src/bindings/$target .rs
21+
22+ if [ " $TARGET_INSTALLED " == " $target " ]; then
23+ rustup target remove $target
24+ fi
25+ done
You can’t perform that action at this time.
0 commit comments