Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
14 changes: 8 additions & 6 deletions src/bootstrap/src/core/build_steps/dist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2871,31 +2871,33 @@ impl Step for ReproducibleArtifacts {
/// 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).
///
/// This component is used for `download-ci-gcc`.
#[derive(Clone, Debug, Eq, Hash, PartialEq)]
pub struct Gcc {
pub struct GccDev {
target: TargetSelection,
}

impl Step for Gcc {
impl Step for GccDev {
type Output = GeneratedTarball;

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

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

fn run(self, builder: &Builder<'_>) -> Self::Output {
let tarball = Tarball::new(builder, "gcc", &self.target.triple);
let tarball = Tarball::new(builder, "gcc-dev", &self.target.triple);
let output = builder
.ensure(super::gcc::Gcc { target_pair: GccTargetPair::for_native_build(self.target) });
tarball.add_file(output.libgccjit(), "lib", FileType::NativeLibrary);
tarball.generate()
}

fn metadata(&self) -> Option<StepMetadata> {
Some(StepMetadata::dist("gcc", self.target))
Some(StepMetadata::dist("gcc-dev", self.target))
}
}
2 changes: 1 addition & 1 deletion src/bootstrap/src/core/builder/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@ impl<'a> Builder<'a> {
dist::PlainSourceTarballGpl,
dist::BuildManifest,
dist::ReproducibleArtifacts,
dist::Gcc
dist::GccDev
),
Kind::Install => describe!(
install::Docs,
Expand Down
2 changes: 1 addition & 1 deletion src/bootstrap/src/core/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ impl Config {
}
let base = &self.stage0_metadata.config.artifacts_server;
let version = self.artifact_version_part(gcc_sha);
let filename = format!("gcc-{version}-{}.tar.xz", self.host_target.triple);
let filename = format!("gcc-dev-{version}-{}.tar.xz", self.host_target.triple);
let tarball = gcc_cache.join(&filename);
if !tarball.exists() {
let help_on_error = "ERROR: failed to download gcc from ci
Expand Down
4 changes: 2 additions & 2 deletions src/ci/docker/host-x86_64/dist-x86_64-linux/dist.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ python3 ../x.py build --set rust.debug=true opt-dist
--include-default-paths \
build-manifest bootstrap

# Use GCC for building GCC, as it seems to behave badly when built with Clang
# Use GCC for building GCC components, as it seems to behave badly when built with Clang
# Only build GCC on full builds, not try builds
if [ "${DIST_TRY_BUILD:-0}" == "0" ]; then
CC=/rustroot/bin/cc CXX=/rustroot/bin/c++ python3 ../x.py dist gcc
CC=/rustroot/bin/cc CXX=/rustroot/bin/c++ python3 ../x.py dist gcc-dev
fi
5 changes: 3 additions & 2 deletions src/ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,9 @@ else
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set llvm.static-libstdcpp"
fi

# Download GCC from CI on test builders
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set gcc.download-ci-gcc=true"
# Download GCC from CI on test builders (temporarily disabled because the CI gcc component
# was renamed).
RUST_CONFIGURE_ARGS="$RUST_CONFIGURE_ARGS --set gcc.download-ci-gcc=false"

# download-rustc seems to be broken on CI after the stage0 redesign
# Disable it until these issues are debugged and resolved
Expand Down
1 change: 0 additions & 1 deletion src/tools/opt-dist/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,6 @@ fn main() -> anyhow::Result<()> {
"clippy",
"miri",
"rustfmt",
"gcc",
"generate-copyright",
"bootstrap",
] {
Expand Down
Loading