makedeb


rustc 1.78.0-1


The Rust programming language toolchain

Click here to go back to the commit logs for rustc.

Commit:


Hash: 7d9380b873b1660d2c4dfb2f9239f458e304b6a8

Message: Fix builds when running in CI

Diff


diff --git a/.SRCINFO b/.SRCINFO
index 04dc5e9..9950f70 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -11,7 +11,7 @@ pkgname = rust-src
 pkgname = rustfmt
 pkgbase = rustc
 pkgdesc = The Rust programming language toolchain
-pkgrel = 1
+pkgrel = 2
 pkgver = 1.70.0
 url = https://www.rust-lang.org
 arch = any
diff --git a/PKGBUILD b/PKGBUILD
index 4789793..10d596c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,6 +1,5 @@
 # Maintainer: Hunter Wittenborn <hunter@hunterwittenborn.com>
 # Contributor: hiddeninthesand <hiddeninthesand at pm dot me>
-
 pkgbase=rustc
 pkgname=(
     'rustc'
@@ -15,7 +14,7 @@ pkgname=(
     'rustfmt'
 )
 pkgver=1.70.0
-pkgrel=1
+pkgrel=2
 pkgdesc='The Rust programming language toolchain'
 arch=('any')
 makedepends=(
@@ -43,7 +42,22 @@ sha256sums=(
 
 build() {
     cd "rustc-${pkgver}-src/"
-    python3 x.py --config "${srcdir}/config.toml" build -j "$(nproc)"
+    args=(
+        'python3'
+        'x.py'
+        '--config'
+        "${srcdir}/config.toml"
+        'build'
+        '-j'
+        "$(nproc)"
+    )
+
+    # If we're building in a CI environment, `x.py` requires us to start builds at stage 2.
+    if [[ "${TF_BUILD:+x}" == 'x' || "${GITHUB_ACTIONS:+x}" == 'x' ]]; then
+        args+=('--stage' '2')
+    fi
+
+    "${args[@]}"
 }
 
 package_rustc() {