From 3ed38b8d2954727b1d2b4e085eda1272c49891d3 Mon Sep 17 00:00:00 2001 From: Andrew Gunnerson Date: Tue, 19 Aug 2025 20:13:56 -0400 Subject: [PATCH] ci.yml: Set RUSTDOCFLAGS to statically link doctests Prior to Rust 1.89, these tests were just skipped when cross-compiling. Now, they are actually compiled and ran. Unfortunately, doctests don't use the normal RUSTFLAGS environment variable, so we also need to set RUSTDOCFLAGS or else the resulting dynamically linked executable will fail to run on a non-Android host. Upstream change: https://github.com/rust-lang/cargo/pull/15462 Signed-off-by: Andrew Gunnerson --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dda989a..868e51b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,8 @@ jobs: CARGO_TERM_COLOR: always # https://github.com/rust-lang/rust/issues/78210 RUSTFLAGS: -C strip=symbols -C target-feature=+crt-static + # https://github.com/rust-lang/cargo/pull/15462 + RUSTDOCFLAGS: -C target-feature=+crt-static TARGETS: ${{ join(matrix.artifact.targets, ' ') || matrix.artifact.name }} ANDROID_API: ${{ matrix.artifact.android_api }} strategy: