Skip to content

Commit 10eab65

Browse files
committed
buildMozillaMach: backport cbindgen 0.29.4 compat
Cherry-picked from 153 to remain compatible with cbindgen 0.29.4.
1 parent 7ec21ab commit 10eab65

2 files changed

Lines changed: 47 additions & 0 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
commit c4aab1ba6aadd6985fcd271679d2118f094ec876
2+
Author: Emilio Cobos Álvarez <emilio@crisal.io>
3+
Date: Tue Jun 9 22:04:44 2026 +0000
4+
5+
Bug 2046162 - Remove some redundant pub qualifiers. r=gfx-reviewers,aosmond
6+
7+
The enum is not public so this doesn't change behavior but a patch I'm
8+
working on in cbindgen gets a bit confused with this.
9+
10+
Differential Revision: https://phabricator.services.mozilla.com/D305678
11+
12+
diff --git a/gfx/wr/webrender/src/texture_cache.rs b/gfx/wr/webrender/src/texture_cache.rs
13+
index e14c26bd3190..77e1f3a312ac 100644
14+
--- a/gfx/wr/webrender/src/texture_cache.rs
15+
+++ b/gfx/wr/webrender/src/texture_cache.rs
16+
@@ -273,9 +273,9 @@ enum BudgetType {
17+
}
18+
19+
impl BudgetType {
20+
- pub const COUNT: usize = 7;
21+
+ const COUNT: usize = 7;
22+
23+
- pub const VALUES: [BudgetType; BudgetType::COUNT] = [
24+
+ const VALUES: [BudgetType; BudgetType::COUNT] = [
25+
BudgetType::SharedColor8Linear,
26+
BudgetType::SharedColor8Nearest,
27+
BudgetType::SharedColor8Glyphs,
28+
@@ -285,7 +285,7 @@ impl BudgetType {
29+
BudgetType::Standalone,
30+
];
31+
32+
- pub const PRESSURE_COUNTERS: [usize; BudgetType::COUNT] = [
33+
+ const PRESSURE_COUNTERS: [usize; BudgetType::COUNT] = [
34+
profiler::ATLAS_COLOR8_LINEAR_PRESSURE,
35+
profiler::ATLAS_COLOR8_NEAREST_PRESSURE,
36+
profiler::ATLAS_COLOR8_GLYPHS_PRESSURE,

pkgs/build-support/build-mozilla-mach/default.nix

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -340,6 +340,17 @@ buildStdenv.mkDerivation {
340340
# https://bugzilla.mozilla.org/show_bug.cgi?id=1985509
341341
./140-bindgen-string-view.patch
342342
]
343+
++
344+
lib.optionals
345+
(
346+
(lib.versionAtLeast version "140" && lib.versionOlder version "140.13")
347+
|| lib.versionOlder version "153"
348+
)
349+
[
350+
# https://github.com/mozilla/cbindgen/issues/1165
351+
# https://bugzilla.mozilla.org/show_bug.cgi?id=2046162
352+
./153-cbindgen-0.29.4-compat.patch
353+
]
343354
++ extraPatches;
344355

345356
postPatch = ''

0 commit comments

Comments
 (0)