Skip to content

Commit

Permalink
fix: try fix musl 15
Browse files Browse the repository at this point in the history
  • Loading branch information
4o3F committed Oct 6, 2024
1 parent 12d2a4d commit 9d1c7b6
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 10 deletions.
14 changes: 7 additions & 7 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[target.x86_64-pc-windows-msvc]
rustflags = ["-C", "target-feature=+crt-static"]

[target.x86_64-unknown-linux-musl]
rustflags = [
"-C",
"target-feature=+crt-static",
"-C",
"linker=/opt/x86_64-linux-musl/bin/x86_64-linux-musl-ld",
]
# [target.x86_64-unknown-linux-musl]
# rustflags = [
# "-C",
# "target-feature=+crt-static",
# "-C",
# "linker=/opt/x86_64-linux-musl/bin/x86_64-linux-musl-ld",
# ]
4 changes: 4 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ jobs:
run: scripts/install.sh
shell: bash

- name: Setup tmate session
uses: mxschmitt/action-tmate@v3


- name: Build project
run: scripts/build.sh
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@ if [[ "$os_family" == "Windows" ]]; then
cargo build --release
elif [[ "$os_family" == "Linux" ]]; then
ci_dir="$(dirname "$0")"
source "$ci_dir/musl.sh"
# source "$ci_dir/musl.sh"
rustup target add x86_64-unknown-linux-musl
cargo build --release --target x86_64-unknown-linux-musl
cargo build --release --target x86_64-unknown-linux-musl
ls ./target
#./target/x86_64-unknown-linux-musl/release/imagetools
else
Expand Down
3 changes: 2 additions & 1 deletion scripts/musl.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ export NM="/opt/x86_64-linux-musl/bin/x86_64-linux-musl-nm"
export SIZE="/opt/x86_64-linux-musl/bin/x86_64-linux-musl-size"
export CPP="/opt/x86_64-linux-musl/bin/x86_64-linux-musl-cpp"
export AS="/opt/x86_64-linux-musl/bin/x86_64-linux-musl-as"
export F77="/opt/x86_64-linux-musl/bin/x86_64-linux-musl-gfortran"
export F77="/opt/x86_64-linux-musl/bin/x86_64-linux-musl-gfortran"
export LD_LIBRARY_PATH="/opt/x86_64-linux-musl/x86_64-linux-musl/lib:$LD_LIBRARY_PATH"

0 comments on commit 9d1c7b6

Please sign in to comment.