Skip to content

Commit dd99021

Browse files
committed
use bootstrap-self-test feature on libstd check
Signed-off-by: onur-ozkan <[email protected]>
1 parent 6bfdb04 commit dd99021

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Diff for: src/bootstrap/src/core/build_steps/tool.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -810,10 +810,10 @@ pub struct LibcxxVersionTool {
810810
pub target: TargetSelection,
811811
}
812812

813+
#[allow(dead_code)]
813814
#[derive(Debug, Clone)]
814815
pub enum LibcxxVersion {
815816
Gnu(usize),
816-
#[allow(dead_code)]
817817
Llvm(usize),
818818
}
819819

Diff for: src/bootstrap/src/core/sanity.rs

+7-2
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,14 @@ use std::fs;
1515
use std::path::PathBuf;
1616
use std::process::Command;
1717

18+
#[cfg(not(feature = "bootstrap-self-test"))]
19+
use crate::builder::Builder;
20+
#[cfg(not(feature = "bootstrap-self-test"))]
21+
use crate::core::build_steps::tool;
1822
#[cfg(not(feature = "bootstrap-self-test"))]
1923
use std::collections::HashSet;
2024

21-
use crate::builder::{Builder, Kind};
22-
use crate::core::build_steps::tool;
25+
use crate::builder::Kind;
2326
use crate::core::config::Target;
2427
use crate::utils::helpers::output;
2528
use crate::Build;
@@ -41,6 +44,7 @@ const STAGE0_MISSING_TARGETS: &[&str] = &[
4144

4245
/// Minimum version threshold for libstdc++ required when using prebuilt LLVM
4346
/// from CI (with`llvm.download-ci-llvm` option).
47+
#[cfg(not(feature = "bootstrap-self-test"))]
4448
const LIBSTDCXX_MIN_VERSION_THRESHOLD: usize = 8;
4549

4650
impl Finder {
@@ -108,6 +112,7 @@ pub fn check(build: &mut Build) {
108112
}
109113

110114
// Ensure that a compatible version of libstdc++ is available on the system when using `llvm.download-ci-llvm`.
115+
#[cfg(not(feature = "bootstrap-self-test"))]
111116
if !build.config.dry_run() && !build.build.is_msvc() && build.config.llvm_from_ci {
112117
let builder = Builder::new(build);
113118
let libcxx_version = builder.ensure(tool::LibcxxVersionTool { target: build.build });

0 commit comments

Comments
 (0)