Rollup merge of #137667 - Kobzol:gcc-dist-build, r=onur-ozkan
Add `dist::Gcc` build step This PR adds a `dist:Gcc` bootstrap step to distribute a prebuilt `libgccjit.so` from CI on x64 Linux. With primed sccache, the build takes ~4 minutes on CI, and produces a 50 MiB archive. I want to land this before adding something akin to `[gcc] download-ci-gcc = true`, to already have the artifacts available on CI, to make it easier to setup the download merge-base logic. r? ``@ghost``
This commit is contained in:
commit
df2a263ec2
4 changed files with 30 additions and 1 deletions
|
|
@ -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()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1072,6 +1072,7 @@ impl<'a> Builder<'a> {
|
|||
dist::PlainSourceTarball,
|
||||
dist::BuildManifest,
|
||||
dist::ReproducibleArtifacts,
|
||||
dist::Gcc
|
||||
),
|
||||
Kind::Install => describe!(
|
||||
install::Docs,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue