Skip to content

Commit

Permalink
CI: Add code coverage mesurement for powerpc-unknown-linux-gnu.
Browse files Browse the repository at this point in the history
Profiler builtins were added in
rust-lang/rust#119404.
  • Loading branch information
briansmith committed May 6, 2024
1 parent f69e502 commit 69c22b1
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ jobs:
- i686-unknown-linux-gnu # Has assembly
# TODO: arm-unknown-linux-gnueabi # Has assembly but doesn't build w/ clang
# TODO: armv7-unknown-linux-gnueabihf # Has assembly but doesn't have profiler builtins
# TODO: powerpc-unknown-linux-gnu No assembly 32-bit big-endian but doesn't have profiler builtins
- powerpc-unknown-linux-gnu # No assembly 32-bit big-endian with flags
- powerpc64-unknown-linux-gnu # No assembly 64-bit big-endian with flags
- powerpc64le-unknown-linux-gnu # No assembly 64-bit little-endian with flags
- riscv64gc-unknown-linux-gnu # No assembly 64-bit little-endian without flags
Expand Down Expand Up @@ -573,6 +573,9 @@ jobs:
- target: i686-unknown-linux-gnu
host_os: ubuntu-22.04

- target: powerpc-unknown-linux-gnu
host_os: ubuntu-22.04

- target: powerpc64-unknown-linux-gnu
host_os: ubuntu-22.04

Expand Down
9 changes: 8 additions & 1 deletion mk/cargo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -231,11 +231,18 @@ if [ -n "${RING_COVERAGE-}" ]; then
;;
esac

additional_rustflags=""
case "$target" in
powerpc-unknown-linux-gnu)
additional_rustflags="-latomic"
;;
esac

runner_var=CARGO_TARGET_${target_upper}_RUNNER
declare -x "${runner_var}=mk/runner ${!runner_var-}"

rustflags_var=CARGO_TARGET_${target_upper}_RUSTFLAGS
declare -x "${rustflags_var}=-Cinstrument-coverage ${!rustflags_var-}"
declare -x "${rustflags_var}=${additional_rustflags} -Cinstrument-coverage ${!rustflags_var-}"
fi

if [ -n "${use_clang}" ]; then
Expand Down

0 comments on commit 69c22b1

Please sign in to comment.