Skip to content

Commit

Permalink
chore: build static c runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
4o3F committed Oct 6, 2024
1 parent 38a5e41 commit 57d0cce
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[target.x86_64-pc-windows-msvc]
rustflags = ["-C", "target-feature=+crt-static"]

[target.x86_64-unknown-linux-musl]
rustflags = ["-C", "linker=clang", "-C", "link-arg=-fuse-ld=lld"]
[target.x86_64-unknown-linux-gnu]
rustflags = ["-C", "target-feature=+crt-static"]
4 changes: 1 addition & 3 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,7 @@ if [[ "$os_family" == "Windows" ]]; then
export OPENCV_MSVC_CRT="static"
cargo build --release
elif [[ "$os_family" == "Linux" ]]; then
sudo apt-get update && sudo apt-get install musl-tools
rustup target add x86_64-unknown-linux-musl
cargo build --release
cargo build --release --target x86_64-unknown-linux-gnu
else
cargo build --release
fi

0 comments on commit 57d0cce

Please sign in to comment.