Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix mips #1394

Merged
merged 1 commit into from
Dec 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion ci/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ main() {
rustup toolchain add nightly
CROSS_FLAGS="${CROSS_FLAGS} -Zbuild-std"
CROSS+=("+nightly")
if [[ "${TARGET}" == *"mips"* ]]; then
# workaround for https://github.com/cross-rs/cross/issues/1322 & https://github.com/rust-lang/rust/issues/108835
[[ ! "$RUSTFLAGS" =~ opt-level ]] && export RUSTFLAGS="${RUSTFLAGS:+$RUSTFLAGS }-C opt-level=1"
fi
elif ! (( ${STD:-0} )); then
# don't use xargo: should have native support just from rustc
rustup toolchain add nightly
Expand Down Expand Up @@ -204,7 +208,7 @@ main() {
pushd "${td}"
cargo init --bin --name hello .
retry cargo fetch
RUSTFLAGS="-C target-feature=-crt-static" \
RUSTFLAGS="$RUSTFLAGS -C target-feature=-crt-static" \
cross_build --target "${TARGET}"
popd

Expand Down
6 changes: 6 additions & 0 deletions targets.toml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ dylib = true
std = true
run = true
runners = "qemu-user"
build-std = true

[[target]]
target = "mipsel-unknown-linux-gnu"
Expand All @@ -131,6 +132,7 @@ dylib = true
std = true
run = true
runners = "qemu-user qemu-system"
build-std = true

[[target]]
target = "mips64-unknown-linux-gnuabi64"
Expand All @@ -139,6 +141,7 @@ cpp = true
dylib = true
std = true
run = true
build-std = true

[[target]]
target = "mips64el-unknown-linux-gnuabi64"
Expand All @@ -148,6 +151,7 @@ dylib = true
std = true
run = true
runners = "qemu-user qemu-system"
build-std = true

[[target]]
target = "mips64-unknown-linux-muslabi64"
Expand All @@ -156,6 +160,7 @@ cpp = true
dylib = true
std = true
run = true
build-std = true

[[target]]
target = "mips64el-unknown-linux-muslabi64"
Expand All @@ -164,6 +169,7 @@ os = "ubuntu-latest"
cpp = true
std = true
run = true
build-std = true

[[target]]
target = "powerpc-unknown-linux-gnu"
Expand Down
Loading