Skip to content

Commit

Permalink
fail on component linking failures
Browse files Browse the repository at this point in the history
Signed-off-by: onur-ozkan <work@onurozkan.dev>
  • Loading branch information
onur-ozkan committed Jul 1, 2024
1 parent f4fdfad commit bf243ea
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions src/bootstrap/src/core/build_steps/compile.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1624,22 +1624,23 @@ impl Step for Sysroot {
let sysroot_lib_rustlib_src_rust = sysroot_lib_rustlib_src.join("rust");
if let Err(e) = symlink_dir(&builder.config, &builder.src, &sysroot_lib_rustlib_src_rust) {
eprintln!(
"WARNING: creating symbolic link `{}` to `{}` failed with {}",
"ERROR: creating symbolic link `{}` to `{}` failed with {}",
sysroot_lib_rustlib_src_rust.display(),
builder.src.display(),
e,
);
if builder.config.rust_remap_debuginfo {
eprintln!(
"WARNING: some `tests/ui` tests will fail when lacking `{}`",
"ERROR: some `tests/ui` tests will fail when lacking `{}`",
sysroot_lib_rustlib_src_rust.display(),
);
}
build_helper::exit!(1);
}

// Unlike rust-src component, we have to handle rustc-src a bit differently, otherwise
// When using CI rustc, we need to use it for the rustc-src component.
// If not CI rustc, we handle it in a similar way what we do for rust-src above.
// Unlike rust-src component, we have to handle rustc-src a bit differently.
// When using CI rustc, we copy rustc-src component from its sysroot, otherwise we
// handle it in a similar way what we do for rust-src above.
if builder.download_rustc() {
cp_rustc_component_to_ci_sysroot(
builder,
Expand All @@ -1654,11 +1655,13 @@ impl Step for Sysroot {
symlink_dir(&builder.config, &builder.src, &sysroot_lib_rustlib_rustcsrc_rust)
{
eprintln!(
"WARNING: creating symbolic link `{}` to `{}` failed with {}",
"ERROR: creating symbolic link `{}` to `{}` failed with {}",
sysroot_lib_rustlib_rustcsrc_rust.display(),
builder.src.display(),
e,
);
build_helper::exit!(1);
}
}

sysroot
Expand Down

0 comments on commit bf243ea

Please sign in to comment.