Skip to content

Commit 5c29561

Browse files
committed
Simplify bootstrap patches
1 parent 9462a94 commit 5c29561

1 file changed

Lines changed: 11 additions & 25 deletions

File tree

scripts/setup_rust_fork.sh

Lines changed: 11 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -66,42 +66,28 @@ diff --git a/src/bootstrap/src/core/config/config.rs b/src/bootstrap/src/core/co
6666
index a656927b1f6..44fc5546fac 100644
6767
--- a/src/bootstrap/src/core/config/config.rs
6868
+++ b/src/bootstrap/src/core/config/config.rs
69-
@@ -2249,14 +2249,6 @@ pub fn parse_download_ci_llvm<'a>(
70-
);
69+
@@ -2249,7 +2249,7 @@ pub fn parse_download_ci_llvm<'a>(
7170
}
7271
73-
- #[cfg(not(test))]
72+
#[cfg(not(test))]
7473
- if b && dwn_ctx.is_running_on_ci && CiEnv::is_rust_lang_managed_ci_job() {
75-
- // On rust-lang CI, we must always rebuild LLVM if there were any modifications to it
76-
- panic!(
77-
- "\`llvm.download-ci-llvm\` cannot be set to \`true\` on CI. Use \`if-unchanged\` instead."
78-
- );
79-
- }
80-
-
81-
// If download-ci-llvm=true we also want to check that CI llvm is available
82-
b && llvm::is_ci_llvm_available_for_target(&dwn_ctx.host_target, asserts)
83-
}
74+
+ if false && dwn_ctx.is_running_on_ci && CiEnv::is_rust_lang_managed_ci_job() {
75+
// On rust-lang CI, we must always rebuild LLVM if there were any modifications to it
76+
panic!(
77+
"\`llvm.download-ci-llvm\` cannot be set to \`true\` on CI. Use \`if-unchanged\` instead."
8478
diff --git a/src/build_helper/src/git.rs b/src/build_helper/src/git.rs
8579
index 330fb465de..a4593ed96f 100644
8680
--- a/src/build_helper/src/git.rs
8781
+++ b/src/build_helper/src/git.rs
88-
@@ -218,15 +218,7 @@ pub fn get_closest_upstream_commit(
82+
@@ -218,7 +218,7 @@ pub fn get_closest_upstream_commit(
8983
config: &GitConfig<'_>,
9084
env: CiEnv,
9185
) -> Result<Option<String>, String> {
9286
- let base = match env {
93-
- CiEnv::None => "HEAD",
94-
- CiEnv::GitHubActions => {
95-
- // On CI, we should always have a non-upstream merge commit at the tip,
96-
- // and our first parent should be the most recently merged upstream commit.
97-
- // We thus simply return our first parent.
98-
- return resolve_commit_sha(git_dir, "HEAD^1").map(Some);
99-
- }
100-
- };
101-
+ let base = "HEAD";
102-
103-
let mut git = Command::new("git");
104-
87+
+ let base = match CiEnv::None {
88+
CiEnv::None => "HEAD",
89+
CiEnv::GitHubActions => {
90+
// On CI, we should always have a non-upstream merge commit at the tip,
10591
EOF
10692

10793
popd

0 commit comments

Comments
 (0)