Skip to content

Commit 97415ce

Browse files
committed
fail on component linking errors
Signed-off-by: onur-ozkan <[email protected]>
1 parent fe6f3fa commit 97415ce

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

src/bootstrap/src/core/build_steps/compile.rs

+6-3
Original file line numberDiff line numberDiff line change
@@ -1624,17 +1624,18 @@ impl Step for Sysroot {
16241624
let sysroot_lib_rustlib_src_rust = sysroot_lib_rustlib_src.join("rust");
16251625
if let Err(e) = symlink_dir(&builder.config, &builder.src, &sysroot_lib_rustlib_src_rust) {
16261626
eprintln!(
1627-
"WARNING: creating symbolic link `{}` to `{}` failed with {}",
1627+
"ERROR: creating symbolic link `{}` to `{}` failed with {}",
16281628
sysroot_lib_rustlib_src_rust.display(),
16291629
builder.src.display(),
16301630
e,
16311631
);
16321632
if builder.config.rust_remap_debuginfo {
16331633
eprintln!(
1634-
"WARNING: some `tests/ui` tests will fail when lacking `{}`",
1634+
"ERROR: some `tests/ui` tests will fail when lacking `{}`",
16351635
sysroot_lib_rustlib_src_rust.display(),
16361636
);
16371637
}
1638+
build_helper::exit!(1);
16381639
}
16391640

16401641
// Unlike rust-src component, we have to handle rustc-src a bit differently.
@@ -1654,11 +1655,13 @@ impl Step for Sysroot {
16541655
symlink_dir(&builder.config, &builder.src, &sysroot_lib_rustlib_rustcsrc_rust)
16551656
{
16561657
eprintln!(
1657-
"WARNING: creating symbolic link `{}` to `{}` failed with {}",
1658+
"ERROR: creating symbolic link `{}` to `{}` failed with {}",
16581659
sysroot_lib_rustlib_rustcsrc_rust.display(),
16591660
builder.src.display(),
16601661
e,
16611662
);
1663+
build_helper::exit!(1);
1664+
}
16621665
}
16631666

16641667
sysroot

0 commit comments

Comments
 (0)