Skip to content

Commit

Permalink
Fix Rust-Cross-Compilation once again
Browse files Browse the repository at this point in the history
Not sure if semantics changed once again, or why this suddenly broke.
  • Loading branch information
BtbN committed Feb 21, 2025
1 parent dd43008 commit 1dd9a40
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion scripts.d/50-rav1e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ffbuild_enabled() {

ffbuild_dockerbuild() {
local myconf=(
--prefix="$FFBUILD_PREFIX"
--prefix="${FFBUILD_PREFIX}"
--target="${FFBUILD_RUST_TARGET}"
--library-type=staticlib
--crt-static
Expand All @@ -24,6 +24,18 @@ ffbuild_dockerbuild() {
# The pinned version is broken, and upstream does not react
cargo update cc

export "AR_${FFBUILD_RUST_TARGET//-/_}"="${AR}"
export "RANLIB_${FFBUILD_RUST_TARGET//-/_}"="${RANLIB}"
export "NM_${FFBUILD_RUST_TARGET//-/_}"="${NM}"
export "LD_${FFBUILD_RUST_TARGET//-/_}"="${LD}"
export "CC_${FFBUILD_RUST_TARGET//-/_}"="${CC}"
export "CXX_${FFBUILD_RUST_TARGET//-/_}"="${CXX}"
export "LD_${FFBUILD_RUST_TARGET//-/_}"="${LD}"
export "CFLAGS_${FFBUILD_RUST_TARGET//-/_}"="${CFLAGS}"
export "CXXFLAGS_${FFBUILD_RUST_TARGET//-/_}"="${CXXFLAGS}"
export "LDFLAGS_${FFBUILD_RUST_TARGET//-/_}"="${LDFLAGS}"
unset AR RANLIB NM CC CXX LD CFLAGS CXXFLAGS LDFLAGS

cargo cinstall -v "${myconf[@]}"

chmod 644 "${FFBUILD_PREFIX}"/lib/*rav1e*
Expand Down

0 comments on commit 1dd9a40

Please sign in to comment.