Skip to content

Commit

Permalink
strip debuginfo issue has been fixed in Rust 1.84
Browse files Browse the repository at this point in the history
  • Loading branch information
taiki-e committed Jan 15, 2025
1 parent 4ae8f13 commit 46eec8f
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions main.sh
Original file line number Diff line number Diff line change
Expand Up @@ -300,21 +300,23 @@ if [[ "${rustc_minor_version}" -ge 59 ]] && [[ -z "${CARGO_PROFILE_RELEASE_STRIP
esac
export CARGO_PROFILE_RELEASE_STRIP="${strip_default}"
fi
# Do not strip debuginfo on these targets in cross-compilation (including docker via cross).
# On pre-1.84, do not strip debuginfo on these targets in cross-compilation (including docker via cross).
# https://github.com/rust-lang/rust/pull/131405
# https://github.com/nextest-rs/nextest/commit/d4f982b3184f07ff5c40cc90c52d3fc6567be0b9#commitcomment-140325483
# https://github.com/rust-lang/rust/issues/123151#issuecomment-2024743520
# https://github.com/rust-lang/rust/blob/1.80.0/compiler/rustc_codegen_ssa/src/back/link.rs#L1055-L1100
# TODO: Add `if [[ "${rustc_minor_version}" -lt patched_version ]]; ..` once upstream bug fixed.
case "${target}" in
*-apple-*)
case "${host_os}" in
macos) ;; # apple to apple cross-compilation is okay
*) export CARGO_PROFILE_RELEASE_STRIP=none ;;
esac
;;
# illumos/AIX host is not supported on GitHub Actions.
*-illumos* | *-aix*) export CARGO_PROFILE_RELEASE_STRIP=none ;;
esac
# https://github.com/rust-lang/rust/blob/1.83.0/compiler/rustc_codegen_ssa/src/back/link.rs#L1089-L1137
if [[ "${rustc_minor_version}" -lt 84 ]]; then
case "${target}" in
*-apple-*)
case "${host_os}" in
macos) ;; # apple to apple cross-compilation is okay
*) export CARGO_PROFILE_RELEASE_STRIP=none ;;
esac
;;
# illumos/AIX host is not supported on GitHub Actions.
*-illumos* | *-aix*) export CARGO_PROFILE_RELEASE_STRIP=none ;;
esac
fi
fi

build() {
Expand Down

0 comments on commit 46eec8f

Please sign in to comment.