Skip to content

Commit ac951d3

Browse files
committed
Auto merge of #138021 - workingjubilee:rollup-brhnycu, r=workingjubilee
Rollup of 6 pull requests Successful merges: - #137077 (Postprocess bootstrap metrics into GitHub job summary) - #137373 (Compile run-make-support and run-make tests with the bootstrap compiler) - #137634 (Update `compiler-builtins` to 0.1.149) - #137667 (Add `dist::Gcc` build step) - #137722 (`librustdoc`: 2024 edition! 🎊) - #137947 (Do not install rustup on Rust for Linux job) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 08db600 + 7ba7cc8 commit ac951d3

File tree

46 files changed

+765
-793
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+765
-793
lines changed

.github/workflows/ci.yml

+17
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,13 @@ jobs:
182182
- name: show the current environment
183183
run: src/ci/scripts/dump-environment.sh
184184

185+
# Pre-build citool before the following step uninstalls rustup
186+
# Build is into the build directory, to avoid modifying sources
187+
- name: build citool
188+
run: |
189+
cd src/ci/citool
190+
CARGO_TARGET_DIR=../../../build/citool cargo build
191+
185192
- name: run the build
186193
# Redirect stderr to stdout to avoid reordering the two streams in the GHA logs.
187194
run: src/ci/scripts/run-build-from-ci.sh 2>&1
@@ -218,6 +225,16 @@ jobs:
218225
# erroring about invalid credentials instead.
219226
if: github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1'
220227

228+
- name: postprocess metrics into the summary
229+
run: |
230+
if [ -f build/metrics.json ]; then
231+
./build/citool/debug/citool postprocess-metrics build/metrics.json ${GITHUB_STEP_SUMMARY}
232+
elif [ -f obj/build/metrics.json ]; then
233+
./build/citool/debug/citool postprocess-metrics obj/build/metrics.json ${GITHUB_STEP_SUMMARY}
234+
else
235+
echo "No metrics.json found"
236+
fi
237+
221238
- name: upload job metrics to DataDog
222239
if: needs.calculate_matrix.outputs.run_type != 'pr'
223240
env:

compiler/rustc_codegen_cranelift/patches/0029-stdlib-Disable-f16-and-f128-in-compiler-builtins.patch

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ index 7165c3e48af..968552ad435 100644
1616

1717
[dependencies]
1818
core = { path = "../core", public = true }
19-
-compiler_builtins = { version = "=0.1.148", features = ['rustc-dep-of-std'] }
20-
+compiler_builtins = { version = "=0.1.148", features = ['rustc-dep-of-std', 'no-f16-f128'] }
19+
-compiler_builtins = { version = "=0.1.150", features = ['rustc-dep-of-std'] }
20+
+compiler_builtins = { version = "=0.1.150", features = ['rustc-dep-of-std', 'no-f16-f128'] }
2121

2222
[dev-dependencies]
2323
rand = { version = "0.8.5", default-features = false, features = ["alloc"] }

compiler/rustc_data_structures/src/captures.rs

-8
This file was deleted.

compiler/rustc_data_structures/src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ pub use rustc_index::static_assert_size;
4848
pub mod aligned;
4949
pub mod base_n;
5050
pub mod binary_search_util;
51-
pub mod captures;
5251
pub mod fingerprint;
5352
pub mod flat_map_in_place;
5453
pub mod flock;

library/Cargo.lock

+2-2
Original file line numberDiff line numberDiff line change
@@ -61,9 +61,9 @@ dependencies = [
6161

6262
[[package]]
6363
name = "compiler_builtins"
64-
version = "0.1.148"
64+
version = "0.1.150"
6565
source = "registry+https://github.com/rust-lang/crates.io-index"
66-
checksum = "26137996631d90d2727b905b480fdcf8c4479fdbce7afd7f8e3796d689b33cc2"
66+
checksum = "5c42734e0ccf0d9f953165770593a75306f0b24dda1aa03f115c70748726dbca"
6767
dependencies = [
6868
"cc",
6969
"rustc-std-workspace-core",

library/alloc/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ edition = "2021"
1212

1313
[dependencies]
1414
core = { path = "../core", public = true }
15-
compiler_builtins = { version = "=0.1.148", features = ['rustc-dep-of-std'] }
15+
compiler_builtins = { version = "=0.1.150", features = ['rustc-dep-of-std'] }
1616

1717
[dev-dependencies]
1818
rand = { version = "0.9.0", default-features = false, features = ["alloc"] }

library/std/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ cfg-if = { version = "1.0", features = ['rustc-dep-of-std'] }
1818
panic_unwind = { path = "../panic_unwind", optional = true }
1919
panic_abort = { path = "../panic_abort" }
2020
core = { path = "../core", public = true }
21-
compiler_builtins = { version = "=0.1.148" }
21+
compiler_builtins = { version = "=0.1.150" }
2222
unwind = { path = "../unwind" }
2323
hashbrown = { version = "0.15", default-features = false, features = [
2424
'rustc-dep-of-std',

src/bootstrap/src/core/build_steps/dist.rs

+27
Original file line numberDiff line numberDiff line change
@@ -2464,3 +2464,30 @@ impl Step for ReproducibleArtifacts {
24642464
if added_anything { Some(tarball.generate()) } else { None }
24652465
}
24662466
}
2467+
2468+
/// Tarball containing a prebuilt version of the libgccjit library,
2469+
/// needed as a dependency for the GCC codegen backend (similarly to the LLVM
2470+
/// backend needing a prebuilt libLLVM).
2471+
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
2472+
pub struct Gcc {
2473+
pub target: TargetSelection,
2474+
}
2475+
2476+
impl Step for Gcc {
2477+
type Output = GeneratedTarball;
2478+
2479+
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
2480+
run.alias("gcc")
2481+
}
2482+
2483+
fn make_run(run: RunConfig<'_>) {
2484+
run.builder.ensure(Gcc { target: run.target });
2485+
}
2486+
2487+
fn run(self, builder: &Builder<'_>) -> Self::Output {
2488+
let tarball = Tarball::new(builder, "gcc", &self.target.triple);
2489+
let output = builder.ensure(super::gcc::Gcc { target: self.target });
2490+
tarball.add_file(output.libgccjit, ".", 0o644);
2491+
tarball.generate()
2492+
}
2493+
}

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

+9-87
Original file line numberDiff line numberDiff line change
@@ -1242,59 +1242,6 @@ macro_rules! test {
12421242
};
12431243
}
12441244

1245-
#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Ord, PartialOrd)]
1246-
pub struct RunMakeSupport {
1247-
pub compiler: Compiler,
1248-
pub target: TargetSelection,
1249-
}
1250-
1251-
impl Step for RunMakeSupport {
1252-
type Output = PathBuf;
1253-
const DEFAULT: bool = true;
1254-
1255-
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
1256-
run.never()
1257-
}
1258-
1259-
fn make_run(run: RunConfig<'_>) {
1260-
let compiler = run.builder.compiler(run.builder.top_stage, run.build_triple());
1261-
run.builder.ensure(RunMakeSupport { compiler, target: run.build_triple() });
1262-
}
1263-
1264-
/// Builds run-make-support and returns the path to the resulting rlib.
1265-
fn run(self, builder: &Builder<'_>) -> PathBuf {
1266-
builder.ensure(compile::Std::new(self.compiler, self.target));
1267-
1268-
let cargo = tool::prepare_tool_cargo(
1269-
builder,
1270-
self.compiler,
1271-
Mode::ToolStd,
1272-
self.target,
1273-
Kind::Build,
1274-
"src/tools/run-make-support",
1275-
SourceType::InTree,
1276-
&[],
1277-
);
1278-
1279-
let _guard = builder.msg_tool(
1280-
Kind::Build,
1281-
Mode::ToolStd,
1282-
"run-make-support",
1283-
self.compiler.stage,
1284-
&self.compiler.host,
1285-
&self.target,
1286-
);
1287-
cargo.into_cmd().run(builder);
1288-
1289-
let lib_name = "librun_make_support.rlib";
1290-
let lib = builder.tools_dir(self.compiler).join(lib_name);
1291-
1292-
let cargo_out = builder.cargo_out(self.compiler, Mode::ToolStd, self.target).join(lib_name);
1293-
builder.copy_link(&cargo_out, &lib);
1294-
lib
1295-
}
1296-
}
1297-
12981245
/// Runs `cargo test` on the `src/tools/run-make-support` crate.
12991246
/// That crate is used by run-make tests.
13001247
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
@@ -1446,40 +1393,7 @@ test!(Pretty {
14461393
only_hosts: true,
14471394
});
14481395

1449-
/// Special-handling is needed for `run-make`, so don't use `test!` for defining `RunMake`
1450-
/// tests.
1451-
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
1452-
pub struct RunMake {
1453-
pub compiler: Compiler,
1454-
pub target: TargetSelection,
1455-
}
1456-
1457-
impl Step for RunMake {
1458-
type Output = ();
1459-
const DEFAULT: bool = true;
1460-
const ONLY_HOSTS: bool = false;
1461-
1462-
fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
1463-
run.suite_path("tests/run-make")
1464-
}
1465-
1466-
fn make_run(run: RunConfig<'_>) {
1467-
let compiler = run.builder.compiler(run.builder.top_stage, run.build_triple());
1468-
run.builder.ensure(RunMakeSupport { compiler, target: run.build_triple() });
1469-
run.builder.ensure(RunMake { compiler, target: run.target });
1470-
}
1471-
1472-
fn run(self, builder: &Builder<'_>) {
1473-
builder.ensure(Compiletest {
1474-
compiler: self.compiler,
1475-
target: self.target,
1476-
mode: "run-make",
1477-
suite: "run-make",
1478-
path: "tests/run-make",
1479-
compare_mode: None,
1480-
});
1481-
}
1482-
}
1396+
test!(RunMake { path: "tests/run-make", mode: "run-make", suite: "run-make", default: true });
14831397

14841398
test!(Assembly { path: "tests/assembly", mode: "assembly", suite: "assembly", default: true });
14851399

@@ -1722,6 +1636,9 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
17221636
host: target,
17231637
});
17241638
}
1639+
if suite == "run-make" {
1640+
builder.tool_exe(Tool::RunMakeSupport);
1641+
}
17251642

17261643
// Also provide `rust_test_helpers` for the host.
17271644
builder.ensure(TestHelpers { target: compiler.host });
@@ -1774,6 +1691,11 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
17741691
};
17751692

17761693
cmd.arg("--cargo-path").arg(cargo_path);
1694+
1695+
// We need to pass the compiler that was used to compile run-make-support,
1696+
// because we have to use the same compiler to compile rmake.rs recipes.
1697+
let stage0_rustc_path = builder.compiler(0, compiler.host);
1698+
cmd.arg("--stage0-rustc-path").arg(builder.rustc(stage0_rustc_path));
17771699
}
17781700

17791701
// Avoid depending on rustdoc when we don't need it.

0 commit comments

Comments
 (0)