commit 0a847dc74237bf0b2bae9e778fc2efe0c7909290
parent 42c441f64dc73cc11a61a7530ee73eb8b0343d92
Author: Mike Hommey <mh+mozilla@glandium.org>
Date: Wed, 26 Nov 2025 20:07:22 +0000
Bug 2002156 - Don't error out when building with rustc nightly on CI. r=firefox-build-system-reviewers,sergesanspaille
This is kind of similar to what was done in bug 1998319.
Differential Revision: https://phabricator.services.mozilla.com/D273936
Diffstat:
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/mozglue/static/rust/build.rs b/mozglue/static/rust/build.rs
@@ -2,7 +2,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
-use rustc_version::{version, Version};
+use rustc_version::{version, version_meta, Channel, Version};
fn main() {
let mut build = cc::Build::new();
@@ -27,7 +27,9 @@ fn main() {
println!("cargo:rustc-cfg=oom_with=\"hook\"");
} else if ver < max_alloc_error_panic_version {
println!("cargo:rustc-cfg=oom_with=\"alloc_error_panic\"");
- } else if std::env::var("MOZ_AUTOMATION").is_ok() {
+ } else if std::env::var("MOZ_AUTOMATION").is_ok()
+ && version_meta().unwrap().channel != Channel::Nightly
+ {
panic!("Builds on automation must use a version of rust for which we know how to hook OOM: want < {}, have {}",
max_alloc_error_panic_version, ver);
}