From 6c38d389f26faf36a3b674f802c37804f5442c0d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Ber=C3=A1nek?= Date: Wed, 9 Jul 2025 10:26:36 +0200 Subject: [PATCH] Add doc cross-compilation test --- src/bootstrap/src/core/builder/tests.rs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/bootstrap/src/core/builder/tests.rs b/src/bootstrap/src/core/builder/tests.rs index cf0cb3a77b1d..9ca79131b8da 100644 --- a/src/bootstrap/src/core/builder/tests.rs +++ b/src/bootstrap/src/core/builder/tests.rs @@ -1579,6 +1579,22 @@ mod snapshot { [doc] std 1 crates=[alloc,core] "); } + + #[test] + fn doc_library_no_std_target_cross_compile() { + let ctx = TestCtx::new(); + insta::assert_snapshot!( + ctx.config("doc") + .path("library") + .targets(&[TEST_TRIPLE_1]) + .override_target_no_std(TEST_TRIPLE_1) + .render_steps(), @r" + [build] llvm + [build] rustc 0 -> rustc 1 + [build] rustdoc 0 + [doc] std 1 crates=[alloc,core] + "); + } } struct ExecutedSteps {