Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 507f6d2

Browse files
add rust.break-on-ice to bootstrap.toml
1 parent 35d55b3 commit 507f6d2

File tree

5 files changed

+18
-2
lines changed

5 files changed

+18
-2
lines changed

‎bootstrap.example.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -856,6 +856,9 @@
856856
# as libstd features, this option can also be used to configure features such as optimize_for_size.
857857
#rust.std-features = ["panic_unwind"]
858858

859+
# Trigger a breakpoint after internal compiler errors during bootstrap on windows
860+
#rust.break-on-ice = true
861+
859862
# =============================================================================
860863
# Distribution options
861864
#

‎src/bootstrap/src/core/builder/cargo.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -877,8 +877,11 @@ impl Builder<'_> {
877877
.env("RUSTC_LIBDIR", libdir)
878878
.env("RUSTDOC", self.bootstrap_out.join("rustdoc"))
879879
.env("RUSTDOC_REAL", rustdoc_path)
880-
.env("RUSTC_ERROR_METADATA_DST", self.extended_error_dir())
881-
.env("RUSTC_BREAK_ON_ICE", "1");
880+
.env("RUSTC_ERROR_METADATA_DST", self.extended_error_dir());
881+
882+
if self.config.rust_break_on_ice {
883+
cargo.env("RUSTC_BREAK_ON_ICE", "1");
884+
}
882885

883886
// Set RUSTC_WRAPPER to the bootstrap shim, which switches between beta and in-tree
884887
// sysroot depending on whether we're building build scripts.

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,7 @@ pub struct Config {
221221
pub rust_lto: RustcLto,
222222
pub rust_validate_mir_opts: Option<u32>,
223223
pub rust_std_features: BTreeSet<String>,
224+
pub rust_break_on_ice: bool,
224225
pub llvm_profile_use: Option<String>,
225226
pub llvm_profile_generate: bool,
226227
pub llvm_libunwind_default: Option<LlvmLibunwind>,
@@ -550,6 +551,7 @@ impl Config {
550551
strip: rust_strip,
551552
lld_mode: rust_lld_mode,
552553
std_features: rust_std_features,
554+
break_on_ice: rust_break_on_ice,
553555
} = toml.rust.unwrap_or_default();
554556

555557
let Llvm {
@@ -1265,6 +1267,7 @@ impl Config {
12651267
reproducible_artifacts: flags_reproducible_artifact,
12661268
reuse: build_reuse.map(PathBuf::from),
12671269
rust_analyzer_info,
1270+
rust_break_on_ice: rust_break_on_ice.unwrap_or(true),
12681271
rust_codegen_backends: rust_codegen_backends
12691272
.map(|backends| parse_codegen_backends(backends, "rust"))
12701273
.unwrap_or(vec![CodegenBackendKind::Llvm]),

‎src/bootstrap/src/core/config/toml/rust.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ define_config! {
6565
lto: Option<String> = "lto",
6666
validate_mir_opts: Option<u32> = "validate-mir-opts",
6767
std_features: Option<BTreeSet<String>> = "std-features",
68+
break_on_ice: Option<bool> = "break-on-ice",
6869
}
6970
}
7071

@@ -355,6 +356,7 @@ pub fn check_incompatible_options_for_ci_rustc(
355356
download_rustc: _,
356357
validate_mir_opts: _,
357358
frame_pointers: _,
359+
break_on_ice: _,
358360
} = ci_rust_config;
359361

360362
// There are two kinds of checks for CI rustc incompatible options:

‎src/bootstrap/src/utils/change_tracker.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -531,4 +531,9 @@ pub const CONFIG_CHANGE_HISTORY: &[ChangeInfo] = &[
531531
severity: ChangeSeverity::Info,
532532
summary: "It is now possible to `check/build/dist` the standard stage 0 library if you use a stage0 rustc built from in-tree sources. This is useful for quickly cross-compiling the standard library. You have to enable build.local-rebuild for this to work.",
533533
},
534+
ChangeInfo {
535+
change_id: 145976,
536+
severity: ChangeSeverity::Info,
537+
summary: "Added a new option `rust.break-on-ice` to control if internal compiler errors cause a debug break on Windows.",
538+
},
534539
];

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /