mirror of
https://mirror.suhoan.cn/https://github.com/EasyTier/EasyTier.git
synced 2025-12-12 20:57:26 +08:00
use mimalloc for mips/mipsel (#71)
This commit is contained in:
@@ -11,7 +11,8 @@ linker = "mipsel-linux-muslsf-gcc"
|
|||||||
rustflags = ["-C", "target-feature=+crt-static",
|
rustflags = ["-C", "target-feature=+crt-static",
|
||||||
"-L", "./musl_gcc/mipsel-linux-muslsf-cross/mipsel-linux-muslsf/lib",
|
"-L", "./musl_gcc/mipsel-linux-muslsf-cross/mipsel-linux-muslsf/lib",
|
||||||
"-L", "./musl_gcc/mipsel-linux-muslsf-cross/lib/gcc/mipsel-linux-muslsf/11.2.1",
|
"-L", "./musl_gcc/mipsel-linux-muslsf-cross/lib/gcc/mipsel-linux-muslsf/11.2.1",
|
||||||
"-l", "atomic"
|
"-l", "atomic",
|
||||||
|
"-l", "ctz"
|
||||||
]
|
]
|
||||||
|
|
||||||
[target.mips-unknown-linux-musl]
|
[target.mips-unknown-linux-musl]
|
||||||
@@ -19,5 +20,6 @@ linker = "mips-linux-muslsf-gcc"
|
|||||||
rustflags = ["-C", "target-feature=+crt-static",
|
rustflags = ["-C", "target-feature=+crt-static",
|
||||||
"-L", "./musl_gcc/mips-linux-muslsf-cross/mips-linux-muslsf/lib",
|
"-L", "./musl_gcc/mips-linux-muslsf-cross/mips-linux-muslsf/lib",
|
||||||
"-L", "./musl_gcc/mips-linux-muslsf-cross/lib/gcc/mips-linux-muslsf/11.2.1",
|
"-L", "./musl_gcc/mips-linux-muslsf-cross/lib/gcc/mips-linux-muslsf/11.2.1",
|
||||||
"-l", "atomic"
|
"-l", "atomic",
|
||||||
|
"-l", "ctz"
|
||||||
]
|
]
|
||||||
6
.github/workflows/rust.yml
vendored
6
.github/workflows/rust.yml
vendored
@@ -119,7 +119,13 @@ jobs:
|
|||||||
# mips/mipsel cannot add target from rustup, need compile by ourselves
|
# mips/mipsel cannot add target from rustup, need compile by ourselves
|
||||||
if [[ $OS =~ ^ubuntu.*$ && $TARGET =~ ^mips.*$ ]]; then
|
if [[ $OS =~ ^ubuntu.*$ && $TARGET =~ ^mips.*$ ]]; then
|
||||||
cd "$PWD/musl_gcc/${MUSL_URI}-cross/lib/gcc/${MUSL_URI}/11.2.1" || exit 255
|
cd "$PWD/musl_gcc/${MUSL_URI}-cross/lib/gcc/${MUSL_URI}/11.2.1" || exit 255
|
||||||
|
# for panic-abort
|
||||||
cp libgcc_eh.a libunwind.a
|
cp libgcc_eh.a libunwind.a
|
||||||
|
|
||||||
|
# for mimalloc
|
||||||
|
ar x libgcc.a _ctzsi2.o _clz.o
|
||||||
|
ar rcs libctz.a _ctzsi2.o _clz.o
|
||||||
|
|
||||||
rustup toolchain install nightly-x86_64-unknown-linux-gnu
|
rustup toolchain install nightly-x86_64-unknown-linux-gnu
|
||||||
rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
|
rustup component add rust-src --toolchain nightly-x86_64-unknown-linux-gnu
|
||||||
cd -
|
cd -
|
||||||
|
|||||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -24,3 +24,5 @@ nohup.out
|
|||||||
.DS_Store
|
.DS_Store
|
||||||
|
|
||||||
components.d.ts
|
components.d.ts
|
||||||
|
|
||||||
|
musl_gcc
|
||||||
|
|||||||
@@ -168,7 +168,7 @@ defguard_wireguard_rs = "0.4.2"
|
|||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["wireguard", "quic", "mimalloc"]
|
default = ["wireguard", "quic", "mimalloc"]
|
||||||
mips = ["aes-gcm"]
|
mips = ["aes-gcm", "mimalloc"]
|
||||||
wireguard = ["dep:boringtun", "dep:ring"]
|
wireguard = ["dep:boringtun", "dep:ring"]
|
||||||
quic = ["dep:quinn", "dep:rustls", "dep:rcgen"]
|
quic = ["dep:quinn", "dep:rustls", "dep:rcgen"]
|
||||||
mimalloc = ["dep:mimalloc-rust"]
|
mimalloc = ["dep:mimalloc-rust"]
|
||||||
|
|||||||
Reference in New Issue
Block a user