From ee92e6b38d32a5a77856c4edcca3fe647c6ada07 Mon Sep 17 00:00:00 2001 From: onur-ozkan Date: Sun, 30 Jun 2024 23:52:49 +0300 Subject: [PATCH] fail on component linking failures Signed-off-by: onur-ozkan --- src/bootstrap/src/core/build_steps/compile.rs | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/bootstrap/src/core/build_steps/compile.rs b/src/bootstrap/src/core/build_steps/compile.rs index 55c1b97c9609c..f38233edafd11 100644 --- a/src/bootstrap/src/core/build_steps/compile.rs +++ b/src/bootstrap/src/core/build_steps/compile.rs @@ -1624,17 +1624,18 @@ 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 @@ -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