Skip to content

Commit 55cfe3c

Browse files
committed
create new option build.compiletest-use-stage0-libtest
Signed-off-by: onur-ozkan <[email protected]>
1 parent b8ff7b6 commit 55cfe3c

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

bootstrap.example.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
# - A new option
2929
# - A change in the default values
3030
#
31-
# If the change-id does not match the version currently in use, x.py will
31+
# If the change-id does not match the version currently in use, x.py will
3232
# display the changes made to the bootstrap.
3333
# To suppress these warnings, you can set change-id = "ignore".
3434
#change-id = <latest change id in src/bootstrap/src/utils/change_tracker.rs>
@@ -442,6 +442,9 @@
442442
# What custom diff tool to use for displaying compiletest tests.
443443
#compiletest-diff-tool = <none>
444444

445+
# Whether to use the precompiled stage0 libtest with compiletest.
446+
#compiletest-use-stage0-libtest = true
447+
445448
# Indicates whether ccache is used when building certain artifacts (e.g. LLVM).
446449
# Set to `true` to use the first `ccache` in PATH, or set an absolute path to use
447450
# a specific version.

src/bootstrap/src/core/config/config.rs

+6
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,9 @@ pub struct Config {
417417
/// Command for visual diff display, e.g. `diff-tool --color=always`.
418418
pub compiletest_diff_tool: Option<String>,
419419

420+
/// Whether to use the precompiled stage0 libtest with compiletest.
421+
pub compiletest_use_stage0_libtest: bool,
422+
420423
pub is_running_on_ci: bool,
421424
}
422425

@@ -983,6 +986,7 @@ define_config! {
983986
optimized_compiler_builtins: Option<bool> = "optimized-compiler-builtins",
984987
jobs: Option<u32> = "jobs",
985988
compiletest_diff_tool: Option<String> = "compiletest-diff-tool",
989+
compiletest_use_stage0_libtest: Option<bool> = "compiletest-use-stage0-libtest",
986990
ccache: Option<StringOrBool> = "ccache",
987991
exclude: Option<Vec<PathBuf>> = "exclude",
988992
}
@@ -1682,6 +1686,7 @@ impl Config {
16821686
optimized_compiler_builtins,
16831687
jobs,
16841688
compiletest_diff_tool,
1689+
compiletest_use_stage0_libtest,
16851690
mut ccache,
16861691
exclude,
16871692
} = toml.build.unwrap_or_default();
@@ -2415,6 +2420,7 @@ impl Config {
24152420
config.optimized_compiler_builtins =
24162421
optimized_compiler_builtins.unwrap_or(config.channel != "dev");
24172422
config.compiletest_diff_tool = compiletest_diff_tool;
2423+
config.compiletest_use_stage0_libtest = compiletest_use_stage0_libtest.unwrap_or(true);
24182424

24192425
let download_rustc = config.download_rustc_commit.is_some();
24202426
config.explicit_stage_from_cli = flags.stage.is_some();

0 commit comments

Comments
 (0)