Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9a4bf9f2cb | ||
|
|
55a48f5dca |
No files matched your search
@@ -60,11 +60,9 @@ jobs:
|
||||
with:
|
||||
toolchain: ${{ startsWith(matrix.target, 'mips') && 'nightly' || 'stable' }}
|
||||
cache: false
|
||||
build-warnings: warn
|
||||
|
||||
- name: Install cross and binary tools
|
||||
env:
|
||||
# Upstream cross warnings must not block installing the build tool.
|
||||
CARGO_BUILD_WARNINGS: warn
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y --no-install-recommends binutils llvm
|
||||
@@ -73,7 +71,8 @@ jobs:
|
||||
|
||||
- name: Build release binary
|
||||
env:
|
||||
RUSTFLAGS: -C target-feature=+crt-static
|
||||
# MIPS build-std lacks Rust's bundled CRT objects; use the cross GCC copies.
|
||||
RUSTFLAGS: ${{ startsWith(matrix.target, 'mips') && '-C target-feature=+crt-static -C link-self-contained=no' || '-C target-feature=+crt-static' }}
|
||||
# Copy toolchains and sources instead of translating nested bind mounts.
|
||||
CROSS_REMOTE: "true"
|
||||
# Cross's per-artifact JSON capture hides compiler diagnostics.
|
||||
|
||||
@@ -7,6 +7,15 @@ image.toolchain = ["linux/arm64=aarch64-unknown-linux-gnu"]
|
||||
pre-build = [
|
||||
"apt-get update && apt-get install -y --no-install-recommends pkg-config",
|
||||
'echo "set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY BOTH)" >> /opt/toolchain.cmake',
|
||||
# Rust's musl std links -lunwind; MIPS cross GCC supplies the unwinder as libgcc_eh.a.
|
||||
'''
|
||||
for cc in /usr/local/bin/mips*-gcc; do
|
||||
[ -x "$cc" ] || continue
|
||||
archive=$("$cc" -print-file-name=libgcc_eh.a)
|
||||
test -f "$archive" || exit 1
|
||||
ln -sf libgcc_eh.a "$(dirname "$archive")/libunwind.a"
|
||||
done
|
||||
''',
|
||||
]
|
||||
|
||||
# This target's image was added after the cross 0.2.5 release.
|
||||
|
||||
Reference in new issue
Block a user