Skip to content

Commit 408b397

Browse files
committed
Do not download GCC in tests
1 parent dcc2b30 commit 408b397

File tree

1 file changed

+6
-0
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+6
-0
lines changed

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

+6
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ pub enum GccBuildStatus {
9393
/// Tries to download GCC from CI if it is enabled and GCC artifacts
9494
/// are available for the given target.
9595
/// Returns a path to the libgccjit.so file.
96+
#[cfg(not(test))]
9697
fn try_download_gcc(builder: &Builder<'_>, target: TargetSelection) -> Option<PathBuf> {
9798
// Try to download GCC from CI if configured and available
9899
if !matches!(builder.config.gcc_ci_mode, GccCiMode::DownloadFromCi) {
@@ -114,6 +115,11 @@ fn try_download_gcc(builder: &Builder<'_>, target: TargetSelection) -> Option<Pa
114115
Some(root.join("libgccjit.so"))
115116
}
116117

118+
#[cfg(test)]
119+
fn try_download_gcc(_builder: &Builder<'_>, _target: TargetSelection) -> Option<PathBuf> {
120+
None
121+
}
122+
117123
/// This returns information about whether GCC should be built or if it's already built.
118124
/// It transparently handles downloading GCC from CI if needed.
119125
///

0 commit comments

Comments
 (0)