From fbca3371ca896ba6e8fb9d843d124cdb36d48e2a 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 9cfbb60..0181555 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,6 +11,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: