Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollup of 6 pull requests #138021

Merged
merged 23 commits into from
Mar 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
4c45285
Add `dist:Gcc` build step
Kobzol Feb 26, 2025
e4bfad2
Build GCC on the Linux x64 dist runner
Kobzol Feb 28, 2025
6563437
Create the `OptimizedDist` tool with a macro
Kobzol Feb 21, 2025
96a9197
Allow specifying that tools build a library, not a binary
Kobzol Feb 21, 2025
807f6ff
Implement `RunMakeSupport` tool using the `bootstrap_tool!` macro
Kobzol Feb 21, 2025
4af94f8
Implement `RunMake` test suite using the `test!` macro
Kobzol Feb 21, 2025
8b4007a
Update `compiler-builtins` to 0.1.150
tgross35 Feb 25, 2025
0034d6c
Compile run-make recipes using the stage0 compiler
Kobzol Feb 24, 2025
9d6ca5f
Ignore a-b-a-linker-guard during cross-compilation
Kobzol Feb 25, 2025
e3117e6
Do not use rustup to build Rust for Linux
Kobzol Mar 3, 2025
4f4cbff
Re-enable Rust for Linux CI job
Kobzol Mar 3, 2025
00523bf
`librustdoc`: 2024 edition! 🎊
yotamofek Feb 27, 2025
6e86aa1
Adapt `librustdoc` to 2024 edition lifetieme capture rules
yotamofek Feb 27, 2025
6463590
Postprocess test suite metrics into GitHub summary
Kobzol Feb 15, 2025
2e5ab4e
Store bootstrap command-line into metrics
Kobzol Feb 19, 2025
ead58ea
Move `BuildStep` and metric logging into `build_helper`
Kobzol Mar 4, 2025
7b53ac7
Record bootstrap step durations into GitHub summary in citool
Kobzol Mar 2, 2025
ee1d019
Rollup merge of #137077 - Kobzol:citool-test-metrics, r=marcoieni
workingjubilee Mar 4, 2025
e5ac9f8
Rollup merge of #137373 - Kobzol:tool-stage0-improve, r=jieyouxu
workingjubilee Mar 4, 2025
dd594f6
Rollup merge of #137634 - tgross35:update-builtins, r=tgross35
workingjubilee Mar 4, 2025
df2a263
Rollup merge of #137667 - Kobzol:gcc-dist-build, r=onur-ozkan
workingjubilee Mar 4, 2025
dcc85e3
Rollup merge of #137722 - yotamofek:pr/rustdoc/edition-2024, r=notriddle
workingjubilee Mar 4, 2025
7ba7cc8
Rollup merge of #137947 - Kobzol:fix-rfl, r=marcoieni
workingjubilee Mar 4, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,13 @@ jobs:
- name: show the current environment
run: src/ci/scripts/dump-environment.sh

# Pre-build citool before the following step uninstalls rustup
# Build is into the build directory, to avoid modifying sources
- name: build citool
run: |
cd src/ci/citool
CARGO_TARGET_DIR=../../../build/citool cargo build

- name: run the build
# Redirect stderr to stdout to avoid reordering the two streams in the GHA logs.
run: src/ci/scripts/run-build-from-ci.sh 2>&1
Expand Down Expand Up @@ -218,6 +225,16 @@ jobs:
# erroring about invalid credentials instead.
if: github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1'

- name: postprocess metrics into the summary
run: |
if [ -f build/metrics.json ]; then
./build/citool/debug/citool postprocess-metrics build/metrics.json ${GITHUB_STEP_SUMMARY}
elif [ -f obj/build/metrics.json ]; then
./build/citool/debug/citool postprocess-metrics obj/build/metrics.json ${GITHUB_STEP_SUMMARY}
else
echo "No metrics.json found"
fi

- name: upload job metrics to DataDog
if: needs.calculate_matrix.outputs.run_type != 'pr'
env:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ index 7165c3e48af..968552ad435 100644

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

[dev-dependencies]
rand = { version = "0.8.5", default-features = false, features = ["alloc"] }
Expand Down
8 changes: 0 additions & 8 deletions compiler/rustc_data_structures/src/captures.rs

This file was deleted.

1 change: 0 additions & 1 deletion compiler/rustc_data_structures/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ pub use rustc_index::static_assert_size;
pub mod aligned;
pub mod base_n;
pub mod binary_search_util;
pub mod captures;
pub mod fingerprint;
pub mod flat_map_in_place;
pub mod flock;
Expand Down
4 changes: 2 additions & 2 deletions library/Cargo.lock
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ dependencies = [

[[package]]
name = "compiler_builtins"
version = "0.1.148"
version = "0.1.150"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26137996631d90d2727b905b480fdcf8c4479fdbce7afd7f8e3796d689b33cc2"
checksum = "5c42734e0ccf0d9f953165770593a75306f0b24dda1aa03f115c70748726dbca"
dependencies = [
"cc",
"rustc-std-workspace-core",
Expand Down
2 changes: 1 addition & 1 deletion library/alloc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ edition = "2021"

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

[dev-dependencies]
rand = { version = "0.9.0", default-features = false, features = ["alloc"] }
Expand Down
2 changes: 1 addition & 1 deletion library/std/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ cfg-if = { version = "1.0", features = ['rustc-dep-of-std'] }
panic_unwind = { path = "../panic_unwind", optional = true }
panic_abort = { path = "../panic_abort" }
core = { path = "../core", public = true }
compiler_builtins = { version = "=0.1.148" }
compiler_builtins = { version = "=0.1.150" }
unwind = { path = "../unwind" }
hashbrown = { version = "0.15", default-features = false, features = [
'rustc-dep-of-std',
Expand Down
27 changes: 27 additions & 0 deletions src/bootstrap/src/core/build_steps/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2464,3 +2464,30 @@ impl Step for ReproducibleArtifacts {
if added_anything { Some(tarball.generate()) } else { None }
}
}

/// Tarball containing a prebuilt version of the libgccjit library,
/// needed as a dependency for the GCC codegen backend (similarly to the LLVM
/// backend needing a prebuilt libLLVM).
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
pub struct Gcc {
pub target: TargetSelection,
}

impl Step for Gcc {
type Output = GeneratedTarball;

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
run.alias("gcc")
}

fn make_run(run: RunConfig<'_>) {
run.builder.ensure(Gcc { target: run.target });
}

fn run(self, builder: &Builder<'_>) -> Self::Output {
let tarball = Tarball::new(builder, "gcc", &self.target.triple);
let output = builder.ensure(super::gcc::Gcc { target: self.target });
tarball.add_file(output.libgccjit, ".", 0o644);
tarball.generate()
}
}
96 changes: 9 additions & 87 deletions src/bootstrap/src/core/build_steps/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1242,59 +1242,6 @@ macro_rules! test {
};
}

#[derive(Debug, Copy, Clone, Hash, PartialEq, Eq, Ord, PartialOrd)]
pub struct RunMakeSupport {
pub compiler: Compiler,
pub target: TargetSelection,
}

impl Step for RunMakeSupport {
type Output = PathBuf;
const DEFAULT: bool = true;

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
run.never()
}

fn make_run(run: RunConfig<'_>) {
let compiler = run.builder.compiler(run.builder.top_stage, run.build_triple());
run.builder.ensure(RunMakeSupport { compiler, target: run.build_triple() });
}

/// Builds run-make-support and returns the path to the resulting rlib.
fn run(self, builder: &Builder<'_>) -> PathBuf {
builder.ensure(compile::Std::new(self.compiler, self.target));

let cargo = tool::prepare_tool_cargo(
builder,
self.compiler,
Mode::ToolStd,
self.target,
Kind::Build,
"src/tools/run-make-support",
SourceType::InTree,
&[],
);

let _guard = builder.msg_tool(
Kind::Build,
Mode::ToolStd,
"run-make-support",
self.compiler.stage,
&self.compiler.host,
&self.target,
);
cargo.into_cmd().run(builder);

let lib_name = "librun_make_support.rlib";
let lib = builder.tools_dir(self.compiler).join(lib_name);

let cargo_out = builder.cargo_out(self.compiler, Mode::ToolStd, self.target).join(lib_name);
builder.copy_link(&cargo_out, &lib);
lib
}
}

/// Runs `cargo test` on the `src/tools/run-make-support` crate.
/// That crate is used by run-make tests.
#[derive(Debug, Clone, PartialEq, Eq, Hash)]
Expand Down Expand Up @@ -1446,40 +1393,7 @@ test!(Pretty {
only_hosts: true,
});

/// Special-handling is needed for `run-make`, so don't use `test!` for defining `RunMake`
/// tests.
#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash)]
pub struct RunMake {
pub compiler: Compiler,
pub target: TargetSelection,
}

impl Step for RunMake {
type Output = ();
const DEFAULT: bool = true;
const ONLY_HOSTS: bool = false;

fn should_run(run: ShouldRun<'_>) -> ShouldRun<'_> {
run.suite_path("tests/run-make")
}

fn make_run(run: RunConfig<'_>) {
let compiler = run.builder.compiler(run.builder.top_stage, run.build_triple());
run.builder.ensure(RunMakeSupport { compiler, target: run.build_triple() });
run.builder.ensure(RunMake { compiler, target: run.target });
}

fn run(self, builder: &Builder<'_>) {
builder.ensure(Compiletest {
compiler: self.compiler,
target: self.target,
mode: "run-make",
suite: "run-make",
path: "tests/run-make",
compare_mode: None,
});
}
}
test!(RunMake { path: "tests/run-make", mode: "run-make", suite: "run-make", default: true });

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

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

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

cmd.arg("--cargo-path").arg(cargo_path);

// We need to pass the compiler that was used to compile run-make-support,
// because we have to use the same compiler to compile rmake.rs recipes.
let stage0_rustc_path = builder.compiler(0, compiler.host);
cmd.arg("--stage0-rustc-path").arg(builder.rustc(stage0_rustc_path));
}

// Avoid depending on rustdoc when we don't need it.
Expand Down
Loading
Loading