Skip to content

Commit 7ed476f

Browse files
committed
bootstrap: don't build redirect pages during dry-run/test
1 parent e2c96cc commit 7ed476f

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/bootstrap/src/core/build_steps/doc.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -274,6 +274,10 @@ impl Step for TheBook {
274274

275275
// build the redirect pages
276276
let _guard = builder.msg(Kind::Doc, "book redirect pages", None, build_compiler, target);
277+
if builder.config.dry_run() {
278+
return;
279+
}
280+
277281
for file in t!(fs::read_dir(redirect_path)) {
278282
let file = t!(file);
279283
let path = file.path();

src/bootstrap/src/core/builder/tests.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,12 +1270,12 @@ mod snapshot {
12701270
[doc] book/first-edition (book) <host>
12711271
[doc] book/second-edition (book) <host>
12721272
[doc] book/2018-edition (book) <host>
1273-
[build] rustdoc 1 <host>
12741273
[build] rustc 1 <host> -> std 1 <target1>
12751274
[doc] book (book) <target1>
12761275
[doc] book/first-edition (book) <target1>
12771276
[doc] book/second-edition (book) <target1>
12781277
[doc] book/2018-edition (book) <target1>
1278+
[build] rustdoc 1 <host>
12791279
[doc] rustc 1 <host> -> standalone 2 <host>
12801280
[doc] rustc 1 <host> -> standalone 2 <target1>
12811281
[doc] rustc 1 <host> -> std 1 <host> crates=[alloc,compiler_builtins,core,panic_abort,panic_unwind,proc_macro,rustc-std-workspace-core,std,std_detect,sysroot,test,unwind]
@@ -1409,12 +1409,12 @@ mod snapshot {
14091409
[doc] book/first-edition (book) <host>
14101410
[doc] book/second-edition (book) <host>
14111411
[doc] book/2018-edition (book) <host>
1412-
[build] rustdoc 1 <host>
14131412
[build] rustc 1 <host> -> std 1 <target1>
14141413
[doc] book (book) <target1>
14151414
[doc] book/first-edition (book) <target1>
14161415
[doc] book/second-edition (book) <target1>
14171416
[doc] book/2018-edition (book) <target1>
1417+
[build] rustdoc 1 <host>
14181418
[doc] rustc 1 <host> -> standalone 2 <host>
14191419
[doc] rustc 1 <host> -> standalone 2 <target1>
14201420
[doc] rustc 1 <host> -> std 1 <host> crates=[alloc,compiler_builtins,core,panic_abort,panic_unwind,proc_macro,rustc-std-workspace-core,std,std_detect,sysroot,test,unwind]
@@ -1493,8 +1493,8 @@ mod snapshot {
14931493
[doc] book/first-edition (book) <target1>
14941494
[doc] book/second-edition (book) <target1>
14951495
[doc] book/2018-edition (book) <target1>
1496-
[build] rustdoc 1 <host>
14971496
[build] rustc 1 <host> -> std 1 <host>
1497+
[build] rustdoc 1 <host>
14981498
[doc] rustc 1 <host> -> standalone 2 <target1>
14991499
[doc] rustc 1 <host> -> std 1 <target1> crates=[alloc,compiler_builtins,core,panic_abort,panic_unwind,proc_macro,rustc-std-workspace-core,std,std_detect,sysroot,test,unwind]
15001500
[doc] nomicon (book) <target1>
@@ -1537,8 +1537,8 @@ mod snapshot {
15371537
[doc] book/first-edition (book) <target1>
15381538
[doc] book/second-edition (book) <target1>
15391539
[doc] book/2018-edition (book) <target1>
1540-
[build] rustdoc 1 <host>
15411540
[build] rustc 1 <host> -> std 1 <host>
1541+
[build] rustdoc 1 <host>
15421542
[doc] rustc 1 <host> -> standalone 2 <target1>
15431543
[doc] rustc 1 <host> -> std 1 <target1> crates=[alloc,compiler_builtins,core,panic_abort,panic_unwind,proc_macro,rustc-std-workspace-core,std,std_detect,sysroot,test,unwind]
15441544
[build] llvm <target1>

0 commit comments

Comments
 (0)