From 57d0cce9b9862ff97c9ae3a0998e1705f8777396 Mon Sep 17 00:00:00 2001 From: 4o3F <4o3f@proton.me> Date: Sun, 6 Oct 2024 20:26:45 +0800 Subject: [PATCH] chore: build static c runtime --- .cargo/config.toml | 4 ++-- scripts/build.sh | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.cargo/config.toml b/.cargo/config.toml index 6a56a90..29a7f7e 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -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"] \ No newline at end of file +[target.x86_64-unknown-linux-gnu] +rustflags = ["-C", "target-feature=+crt-static"] diff --git a/scripts/build.sh b/scripts/build.sh index 6e4be56..0d1e68f 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -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 \ No newline at end of file