Skip to content

Commit

Permalink
fix: aws-lc requires bindgen-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
zonyitoo committed May 25, 2024
1 parent e507e29 commit 7c13e8a
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 2 deletions.
32 changes: 30 additions & 2 deletions Cross.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,37 @@
[build.env]
passthrough = ["RUSTFLAGS"]
pre-build = [
# https://aws.github.io/aws-lc-rs/requirements/linux.html
"apt-get update",
"apt-get install --assume-yes libclang1",
"cargo install --force --locked bindgen-cli",
]

[target.x86_64-pc-windows-gnu]
pre-build = [
# Install NVIM for rustls, which deps on aws-lc-rs by default, and it needs NASM
# Install NASM for rustls, which deps on aws-lc-rs by default, and it needs NASM
"apt-get update",
"apt-get install --assume-yes nasm clang",
"apt-get install --assume-yes libclang1 nasm cargo",
"cargo install --force --locked bindgen-cli",
]

[target.aarch64-unknown-linux-gnu]
pre-build = []

[target.aarch64-unknown-linux-musl]
pre-build = []

[target.x86_64-unknown-linux-gnu]
pre-build = []

[target.x86_64-unknown-linux-musl]
pre-build = []

[target.i686-unknown-linux-gnu]
pre-build = []

[target.aarch64-apple-darwin]
pre-build = []

[target.x86_64-apple-darwin]
pre-build = []
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ RUN case "$TARGETARCH" in \
&& echo "CC=$CC" \
&& rustup override set stable \
&& rustup target add "$RUST_TARGET" \
&& cargo install --force --locked bindgen-cli \
&& RUSTFLAGS="-C linker=$CC" CC=$CC cargo build --target "$RUST_TARGET" --release --features "full" \
&& mv target/$RUST_TARGET/release/ss* target/release/

Expand Down

0 comments on commit 7c13e8a

Please sign in to comment.