mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-29 16:37:07 +00:00
fix(build): enable tokio_unstable in build script (#2376)
Co-authored-by: houseme <housemecn@gmail.com>
This commit is contained in:
+2
-2
@@ -213,7 +213,7 @@ setup_rust_environment() {
|
|||||||
# Set up environment variables for musl targets
|
# Set up environment variables for musl targets
|
||||||
if [[ "$PLATFORM" == *"musl"* ]]; then
|
if [[ "$PLATFORM" == *"musl"* ]]; then
|
||||||
print_message $YELLOW "Setting up environment for musl target..."
|
print_message $YELLOW "Setting up environment for musl target..."
|
||||||
export RUSTFLAGS="-C target-feature=-crt-static"
|
export RUSTFLAGS="'--cfg tokio_unstable -C target-feature=-crt-static'"
|
||||||
|
|
||||||
# For cargo-zigbuild, set up additional environment variables
|
# For cargo-zigbuild, set up additional environment variables
|
||||||
if command -v cargo-zigbuild &> /dev/null; then
|
if command -v cargo-zigbuild &> /dev/null; then
|
||||||
@@ -430,7 +430,7 @@ build_binary() {
|
|||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
# Native compilation
|
# Native compilation
|
||||||
build_cmd="RUSTFLAGS=-Clink-arg=-lm cargo build"
|
build_cmd="RUSTFLAGS='--cfg tokio_unstable -Clink-arg=-lm' cargo build"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$BUILD_TYPE" = "release" ]; then
|
if [ "$BUILD_TYPE" = "release" ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user