about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMazdak Farrokhzad <twingoow@gmail.com>2019-09-01 11:39:28 +0200
committerGitHub <noreply@github.com>2019-09-01 11:39:28 +0200
commit6eadfc34591ff477b7dbfea44738c9eaccc83e92 (patch)
treebd826ff5610621196a3e5f34fc8a24c3323dba50
parentbccf49ffc824fa55d8e60c4ff1868bb105c096e5 (diff)
parent0b478e6d46f273041ea7a4e048083d7d4e54c8fe (diff)
downloadrust-6eadfc34591ff477b7dbfea44738c9eaccc83e92.tar.gz
rust-6eadfc34591ff477b7dbfea44738c9eaccc83e92.zip
Rollup merge of #64032 - andjo403:codegen-units, r=Mark-Simulacrum
rustdoc use -Ccodegen-units=1 by default for test compile

as the test is small we do not want split up in multiple codegen units
and also as there is multiple test running at the same time this
will reduce the number of concurrent threads

tested the test time with `./x.py test src/libcore --doc`
for my 16 core 32 thread cpu i get about 6% faster execution
and my 2 core 4 thread cpu I get about 10% faster execution

cc #63638
 r? @Mark-Simulacrum
-rw-r--r--src/librustdoc/test.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/librustdoc/test.rs b/src/librustdoc/test.rs
index 31c0b85a481..88397aacac1 100644
--- a/src/librustdoc/test.rs
+++ b/src/librustdoc/test.rs
@@ -263,6 +263,7 @@ fn run_test(
     for extern_str in &options.extern_strs {
         compiler.arg("--extern").arg(&extern_str);
     }
+    compiler.arg("-Ccodegen-units=1");
     for codegen_options_str in &options.codegen_options_strs {
         compiler.arg("-C").arg(&codegen_options_str);
     }