Skip to content

Commit 12cd365

Browse files
Auto merge of #147518 - dianqk:update-llvm, r=<try>
Update LLVM to 21.1.3 try-job: x86_64-gnu-distcheck
2 parents 9725c4b + cbeedc7 commit 12cd365

File tree

4 files changed

+19
-11
lines changed

4 files changed

+19
-11
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,8 @@ jobs:
246246
run: src/ci/scripts/create-doc-artifacts.sh
247247

248248
- name: print disk usage
249+
# We also want to know the disk usage when the job fails.
250+
if: always()
249251
run: |
250252
echo "disk usage:"
251253
df -h

src/bootstrap/Cargo.toml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ default-run = "bootstrap"
77

88
[features]
99
build-metrics = ["sysinfo"]
10-
tracing = ["dep:tracing", "dep:tracing-chrome", "dep:tracing-subscriber", "dep:chrono", "dep:tempfile"]
10+
tracing = ["dep:tracing", "dep:tracing-chrome", "dep:tracing-subscriber", "dep:chrono"]
1111

1212
[lib]
1313
path = "src/lib.rs"
@@ -64,7 +64,7 @@ chrono = { version = "0.4", default-features = false, optional = true, features
6464
tracing = { version = "0.1", optional = true, features = ["attributes"] }
6565
tracing-chrome = { version = "0.7", optional = true }
6666
tracing-subscriber = { version = "0.3", optional = true, features = ["env-filter", "fmt", "registry", "std"] }
67-
tempfile = { version = "3.15.0", optional = true }
67+
tempfile = { version = "3.15.0" }
6868

6969
[target.'cfg(windows)'.dependencies.junction]
7070
version = "1.3.0"
@@ -83,7 +83,6 @@ features = [
8383

8484
[dev-dependencies]
8585
pretty_assertions = "1.4"
86-
tempfile = "3.15.0"
8786
insta = "1.43"
8887

8988
# We care a lot about bootstrap's compile times, so don't include debuginfo for

src/bootstrap/src/core/build_steps/test.rs

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ use std::path::{Path, PathBuf};
1010
use std::{env, fs, iter};
1111

1212
use build_helper::exit;
13+
use tempfile::TempDir;
1314

1415
use crate::core::build_steps::compile::{Std, run_cargo};
1516
use crate::core::build_steps::doc::{DocumentationFormat, prepare_doc_compiler};
@@ -3221,17 +3222,21 @@ impl Step for Distcheck {
32213222
fn run(self, builder: &Builder<'_>) {
32223223
// Use a temporary directory completely outside the current checkout, to avoid reusing any
32233224
// local source code, built artifacts or configuration by accident
3224-
let root_dir = std::env::temp_dir().join("distcheck");
3225+
let root_dir = TempDir::with_prefix("distcheck-").unwrap();
32253226

3226-
distcheck_plain_source_tarball(builder, &root_dir.join("distcheck-rustc-src"));
3227-
distcheck_rust_src(builder, &root_dir.join("distcheck-rust-src"));
3228-
distcheck_rustc_dev(builder, &root_dir.join("distcheck-rustc-dev"));
3227+
distcheck_plain_source_tarball(
3228+
builder,
3229+
TempDir::with_prefix_in("rustc-src-", &root_dir).unwrap(),
3230+
);
3231+
distcheck_rust_src(builder, TempDir::with_prefix_in("rust-src-", &root_dir).unwrap());
3232+
distcheck_rustc_dev(builder, TempDir::with_prefix_in("rustc-dev-", &root_dir).unwrap());
32293233
}
32303234
}
32313235

32323236
/// Check that we can build some basic things from the plain source tarball
3233-
fn distcheck_plain_source_tarball(builder: &Builder<'_>, plain_src_dir: &Path) {
3237+
fn distcheck_plain_source_tarball(builder: &Builder<'_>, plain_src_dir: TempDir) {
32343238
builder.info("Distcheck plain source tarball");
3239+
let plain_src_dir = plain_src_dir.path();
32353240
let plain_src_tarball = builder.ensure(dist::PlainSourceTarball);
32363241
builder.clear_dir(plain_src_dir);
32373242

@@ -3262,8 +3267,9 @@ fn distcheck_plain_source_tarball(builder: &Builder<'_>, plain_src_dir: &Path) {
32623267
}
32633268

32643269
/// Check that rust-src has all of libstd's dependencies
3265-
fn distcheck_rust_src(builder: &Builder<'_>, src_dir: &Path) {
3270+
fn distcheck_rust_src(builder: &Builder<'_>, src_dir: TempDir) {
32663271
builder.info("Distcheck rust-src");
3272+
let src_dir = src_dir.path();
32673273
let src_tarball = builder.ensure(dist::Src);
32683274
builder.clear_dir(src_dir);
32693275

@@ -3287,8 +3293,9 @@ fn distcheck_rust_src(builder: &Builder<'_>, src_dir: &Path) {
32873293
}
32883294

32893295
/// Check that rustc-dev's compiler crate source code can be loaded with `cargo metadata`
3290-
fn distcheck_rustc_dev(builder: &Builder<'_>, dir: &Path) {
3296+
fn distcheck_rustc_dev(builder: &Builder<'_>, dir: TempDir) {
32913297
builder.info("Distcheck rustc-dev");
3298+
let dir = dir.path();
32923299
let tarball = builder.ensure(dist::RustcDev::new(builder, builder.host_target)).unwrap();
32933300
builder.clear_dir(dir);
32943301

0 commit comments

Comments
 (0)