Skip to content

Commit ad61254

Browse files
committed
CI/CD: Don't use self-contained linking during code coverage.
Work around a bug in the Rust toolchain.
1 parent e775fed commit ad61254

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

.github/workflows/ci.yml

+11
Original file line numberDiff line numberDiff line change
@@ -304,15 +304,26 @@ jobs:
304304

305305
# TODO: targets
306306
include:
307+
# TODO: Use the -musl target after
308+
# https://github.com/rust-lang/rust/issues/79556 and
309+
# https://github.com/rust-lang/rust/issues/79555 are fixed.
307310
- target: aarch64-unknown-linux-gnu
308311
host_os: ubuntu-18.04
309312

313+
# TODO: Use the -musl target after
314+
# https://github.com/rust-lang/rust/issues/79556 and
315+
# https://github.com/rust-lang/rust/issues/79555 are fixed.
310316
- target: i686-unknown-linux-gnu
311317
host_os: ubuntu-18.04
312318

313319
- target: x86_64-unknown-linux-musl
314320
host_os: ubuntu-18.04
315321

322+
# TODO: Add an ARM target after
323+
# https://github.com/rust-lang/rust/issues/79555 is fixed. This may
324+
# require https://github.com/rust-lang/rust/issues/79555 to be fixed
325+
# too.
326+
316327
steps:
317328
- uses: actions/checkout@v2
318329

mk/cargo.sh

+6-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,12 @@ case $target in
9393
x86_64-unknown-linux-musl)
9494
export CC_x86_64_unknown_linux_musl=clang-$llvm_version
9595
export AR_x86_64_unknown_linux_musl=llvm-ar-$llvm_version
96-
export CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="$rustflags_self_contained"
96+
# XXX: Work around https://github.com/rust-lang/rust/issues/79555.
97+
if [ -n "${RING_COVERAGE-}" ]; then
98+
export CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER=clang-$llvm_version
99+
else
100+
export CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_RUSTFLAGS="$rustflags_self_contained"
101+
fi
97102
;;
98103
wasm32-unknown-unknown)
99104
# The first two are only needed for when the "wasm_c" feature is enabled.

0 commit comments

Comments
 (0)