Skip to content

Commit

Permalink
disable download-rustc if LLVM submodule has changes in CI
Browse files Browse the repository at this point in the history
Signed-off-by: onur-ozkan <work@onurozkan.dev>
  • Loading branch information
onur-ozkan committed Oct 10, 2024
1 parent 7a0e8bd commit 04e7cec
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions src/bootstrap/src/core/config/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2399,6 +2399,19 @@ impl Config {
Some(commit) => {
self.download_ci_rustc(commit);

// We never enable `download-rustc` without `download-ci-llvm`. If `self.llvm_from_ci` is false,
// it means the "if-unchanged" logic has detected some changes in the LLVM submodule.
if CiEnv::is_ci() && !self.llvm_from_ci {
// This happens when LLVM submodule is updated in CI, we should disable ci-rustc without an error
// to not break CI. For non-CI environments, we should return an error.
if CiEnv::is_ci() {
println!("WARNING: LLVM submodule has changes, `download-rustc` will be disabled.");
return None;
} else {
panic!("ERROR: LLVM submodule has changes, `download-rustc` can't be used.");
}
}

if let Some(config_path) = &self.config {
let ci_config_toml = match self.get_builder_toml("ci-rustc") {
Ok(ci_config_toml) => ci_config_toml,
Expand Down
2 changes: 1 addition & 1 deletion src/doc/rustc-dev-guide
Submodule rustc-dev-guide updated 45 files
+2 −5 examples/rustc-driver-getting-diagnostics.rs
+6 −8 src/SUMMARY.md
+12 −14 src/building/build-install-distribution-artifacts.md
+4 −24 src/building/how-to-build-and-run.md
+2 −10 src/building/new-target.md
+21 −31 src/building/quickstart.md
+139 −179 src/building/suggested.md
+1 −1 src/compiler-debugging.md
+79 −92 src/compiler-src.md
+1 −1 src/diagnostics/diagnostic-items.md
+0 −13 src/git.md
+194 −206 src/macro-expansion.md
+19 −33 src/memory.md
+7 −7 src/mir/index.md
+32 −44 src/name-resolution.md
+31 −8 src/profiling/with_perf.md
+0 −37 src/profiling/with_rustc_perf.md
+3 −3 src/rustc-driver-getting-diagnostics.md
+1 −1 src/rustc-driver-interacting-with-the-ast.md
+45 −0 src/rustc-driver.md
+0 −50 src/rustc-driver/intro.md
+3 −73 src/rustdoc-internals/search.md
+2 −2 src/rustdoc.md
+41 −40 src/salsa.md
+53 −73 src/serialization.md
+4 −16 src/stability.md
+10 −16 src/syntax-intro.md
+91 −96 src/tests/adding.md
+0 −194 src/tests/best-practices.md
+117 −244 src/tests/ci.md
+278 −342 src/tests/compiletest.md
+15 −15 src/tests/crater.md
+0 −443 src/tests/directives.md
+0 −28 src/tests/ecosystem.md
+9 −10 src/tests/fuchsia.md
+449 −0 src/tests/headers.md
+49 −0 src/tests/integration.md
+47 −54 src/tests/intro.md
+23 −27 src/tests/perf.md
+109 −140 src/tests/running.md
+13 −26 src/tests/rust-for-linux.md
+19 −23 src/tests/suggest-tests.md
+253 −245 src/tests/ui.md
+37 −41 src/the-parser.md
+3 −3 src/traits/unsize.md

0 comments on commit 04e7cec

Please sign in to comment.